From bb609781c194f0c6d5421fc5e4c49ee8435fd123 Mon Sep 17 00:00:00 2001 From: Wojciech Graj Date: Tue, 25 Apr 2023 01:58:20 +0200 Subject: [PATCH] Fix all compilation warnings. --- lib/hashmap_c/hashmap.c | 3 ++- meson.build | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/hashmap_c/hashmap.c b/lib/hashmap_c/hashmap.c index 939d6bb..b983d18 100644 --- a/lib/hashmap_c/hashmap.c +++ b/lib/hashmap_c/hashmap.c @@ -87,7 +87,7 @@ struct hashmap *hashmap_new_with_allocator( _malloc = _malloc ? _malloc : malloc; _realloc = _realloc ? _realloc : realloc; _free = _free ? _free : free; - int ncap = 16; + size_t ncap = 16; if (cap < ncap) { cap = ncap; } else { @@ -609,6 +609,7 @@ uint64_t hashmap_murmur(const void *data, size_t len, char out[16]; MM86128(data, len, seed0, &out); return *(uint64_t*)out; + (void)seed1; } //============================================================================== diff --git a/meson.build b/meson.build index 8429645..4646d3d 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,14 @@ project( ], ) +add_project_arguments( + '-Wno-implicit-fallthrough', + '-Wno-dangling-else', + '-Wno-newline-eof', + '-Wno-unknown-pragmas', + language : ['c'], +) + cc = meson.get_compiler('c') deps = [