diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-07-29 16:40:27 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-07-29 18:57:03 +0200 |
commit | e552057558ac4c02b9bba922ee2f06d2f9b0d57d (patch) | |
tree | 5bcd9d91896ba19014799730fe02f94ec05c85ca | |
parent | faa39ef9c9a2452df5caedecf1452ec262b2816b (diff) | |
download | gobject-introspection-e552057558ac4c02b9bba922ee2f06d2f9b0d57d.tar.gz |
build: enable -Wtype-limits
hashv is unsigned, no need to check if >= 0
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | girepository/gthash.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index a8482ca6..bfe7c5d8 100644 --- a/configure.ac +++ b/configure.ac @@ -65,7 +65,7 @@ AX_COMPILER_FLAGS(,, [yes]) # These get triggered a lot, not worth it imo, but feel free to fix them AX_APPEND_COMPILE_FLAGS([-Wno-duplicated-branches -Wno-switch-enum]) # FIXME: Fix the warnings and remove the flags -AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-deprecated-declarations -Wno-type-limits]) +AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-deprecated-declarations]) WARN_CFLAGS_PYTHON="$WARN_CFLAGS" AX_APPEND_COMPILE_FLAGS([-Wno-discarded-qualifiers], [WARN_CFLAGS_PYTHON]) diff --git a/girepository/gthash.c b/girepository/gthash.c index 2fda9035..16bfb4b8 100644 --- a/girepository/gthash.c +++ b/girepository/gthash.c @@ -177,7 +177,7 @@ _gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint guint32 hashv; hashv = cmph_search_packed (packed_mem, str, strlen (str)); - g_assert (hashv >= 0 && hashv < num_elts); + g_assert (hashv < num_elts); table[hashv] = strval; } } |