cjdns/cjdns.warnings.patch

124 lines
4.9 KiB
Diff
Raw Normal View History

diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
2017-02-24 18:03:46 +00:00
--- ./crypto/CryptoAuth.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./crypto/CryptoAuth.c 2017-02-24 12:36:55.762819179 -0500
@@ -85,6 +85,8 @@ static inline void getSharedSecret(uint8
uint8_t passwordHash[32],
struct Log* logger)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-result"
if (passwordHash == NULL) {
crypto_box_curve25519xsalsa20poly1305_beforenm(outputSecret, herPublicKey, myPrivateKey);
} else {
2017-02-24 18:03:46 +00:00
@@ -100,6 +102,7 @@ static inline void getSharedSecret(uint8
Bits_memcpy(buff.components.passwd, passwordHash, 32);
crypto_hash_sha256(outputSecret, buff.bytes, 64);
}
+#pragma GCC diagnostic pop
if (Defined(Log_KEYS)) {
uint8_t myPublicKeyHex[65];
printHexPubKey(myPublicKeyHex, myPrivateKey);
2016-03-22 15:40:36 +00:00
diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
2017-02-24 18:03:46 +00:00
--- ./dht/CJDHTConstants.h.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./dht/CJDHTConstants.h 2017-02-24 12:36:55.762819179 -0500
2016-03-22 15:40:36 +00:00
@@ -17,7 +17,9 @@
#include "benc/String.h"
#include "util/version/Version.h"
-
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wunused-const-variable"
// Signifying that this message is a query and defining the query type.
static String* const CJDHTConstants_QUERY = String_CONST_SO("q");
@@ -61,5 +63,5 @@ static String* const CJDHTConstants_ENC_
// Encoding scheme and index for the closest peer along the path.
static String* const CJDHTConstants_PEER_ENC_SCHEME = String_CONST_SO("pes");
static String* const CJDHTConstants_PEER_ENC_INDEX = String_CONST_SO("pei");
-
+#pragma GCC diagnostic pop
#endif
2017-02-18 20:37:24 +00:00
diff -up ./dht/dhtcore/NodeStore.c.warnings ./dht/dhtcore/NodeStore.c
2017-02-24 18:03:46 +00:00
--- ./dht/dhtcore/NodeStore.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./dht/dhtcore/NodeStore.c 2017-02-24 12:44:19.822328184 -0500
@@ -1770,7 +1770,9 @@ struct NodeList* NodeStore_getPeers(uint
2017-02-18 20:37:24 +00:00
break;
}
switch (j) {
2017-02-24 18:03:46 +00:00
- default: Bits_memmove(out->nodes, &out->nodes[1], (j - 1) * sizeof(char*));
+ default:
+ Bits_memmove(out->nodes, &out->nodes[1], (j - 1) * sizeof(char*));
+ Gcc_FALLTHROUGH;
2017-02-18 20:37:24 +00:00
case 1: out->nodes[j - 1] = next->child;
case 0:;
}
2016-03-22 15:40:36 +00:00
diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node_build/dependencies/libuv/test/test-getsockname.c
2017-02-24 18:03:46 +00:00
--- ./node_build/dependencies/libuv/test/test-getsockname.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2017-02-24 12:36:55.763819191 -0500
2016-03-22 15:40:36 +00:00
@@ -18,7 +18,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
-
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#include "uv.h"
#include "task.h"
2017-02-24 18:03:46 +00:00
diff -up ./util/Gcc.h.warnings ./util/Gcc.h
--- ./util/Gcc.h.warnings 2017-02-24 12:41:36.926182554 -0500
2017-02-24 18:11:57 +00:00
+++ ./util/Gcc.h 2017-02-24 13:06:44.166644855 -0500
@@ -40,6 +40,11 @@
2017-02-24 18:03:46 +00:00
#define Gcc_USE_RET \
__attribute__ ((warn_unused_result))
+#if __GNUC__ >= 7
+#define Gcc_FALLTHROUGH \
2017-02-24 18:11:57 +00:00
+ __attribute__ ((fallthrough))
2017-02-24 18:03:46 +00:00
+#endif
+
#elif defined(__clang__)
#define Gcc_NORETURN \
2017-02-24 18:11:57 +00:00
@@ -50,6 +55,9 @@
#endif
+#ifndef Gcc_FALLTHROUGH
+ #define Gcc_FALLTHROUGH (void)0
+#endif
#ifndef Gcc_PRINTF
#define Gcc_PRINTF( format_idx, arg_idx )
#endif
2016-03-22 15:40:36 +00:00
diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/netdev/NetPlatform_linux.c
2017-02-24 18:03:46 +00:00
--- ./util/platform/netdev/NetPlatform_linux.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./util/platform/netdev/NetPlatform_linux.c 2017-02-24 14:55:11.354136283 -0500
@@ -36,6 +36,7 @@
#include <linux/route.h>
#if ! defined(android)
#include <linux/ipv6_route.h>
+ #include <linux/ipv6.h>
#endif
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
@@ -165,7 +166,7 @@ void NetPlatform_addAddress(const char*
2016-03-22 15:40:36 +00:00
Except_throw(eh, "ioctl(SIOCSIFADDR) failed: [%s]", strerror(err));
}
2016-06-23 21:22:04 +00:00
- uint32_t x = (uint32_t)~0 << (32 - prefixLen);
2016-03-22 15:40:36 +00:00
+ uint32_t x = ~0U << (32 - prefixLen);
x = Endian_hostToBigEndian32(x);
memcpy(&sin.sin_addr, &x, 4);
memcpy(&ifRequest.ifr_addr, &sin, sizeof(struct sockaddr_in));
diff -up ./util/platform/Sockaddr.c.warnings ./util/platform/Sockaddr.c
2017-02-24 18:03:46 +00:00
--- ./util/platform/Sockaddr.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./util/platform/Sockaddr.c 2017-02-24 12:36:55.763819191 -0500
2016-03-22 15:40:36 +00:00
@@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License
2017-02-24 17:24:38 +00:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2016-03-22 15:40:36 +00:00
*/
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#include "util/events/libuv/UvWrapper.h"
#include "benc/String.h"
#include "memory/Allocator.h"