From 3aa16b63e834026003d57d5328adf2ec9a69a9b5 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:49:39 +0100 Subject: Fix some warnings when compiling with "-W -Wall" flags (#1103) --- example/ndpiReader.c | 4 ++-- src/lib/third_party/src/hll/MurmurHash3.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 52e4e2da8..9c882101b 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1111,7 +1111,6 @@ static char* is_unsafe_cipher(ndpi_cipher_weakness c) { void print_bin(FILE *fout, const char *label, struct ndpi_bin *b) { u_int8_t i; - FILE *out = results_file ? results_file : stdout; const char *sep = label ? "," : ";"; ndpi_normalize_bin(b); @@ -3384,9 +3383,9 @@ void test_lib() { /* *********************************************** */ +#if 0 static void binUnitTest() { struct ndpi_bin *bins, b0, b1; - u_int8_t versbose = 0; u_int8_t num_bins = 32; u_int8_t num_points = 24; u_int32_t i, j; @@ -3441,6 +3440,7 @@ static void binUnitTest() { // exit(0); } +#endif /* *********************************************** */ diff --git a/src/lib/third_party/src/hll/MurmurHash3.c b/src/lib/third_party/src/hll/MurmurHash3.c index 47fb9da14..ba4d60680 100644 --- a/src/lib/third_party/src/hll/MurmurHash3.c +++ b/src/lib/third_party/src/hll/MurmurHash3.c @@ -39,8 +39,10 @@ u_int32_t MurmurHash3_x86_32(const void *key, u_int32_t len, u_int32_t seed) { { case 3: k1 ^= (u_int32_t)tail[2] << 16; + /* fall-through */ case 2: k1 ^= (u_int32_t)tail[1] << 8; + /* fall-through */ case 1: k1 ^= tail[0]; k1 *= c1; -- cgit v1.2.3