]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
build-sys: try harder to shut up compiler wrt strict-aliasing
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 25 Mar 2014 02:50:24 +0000 (23:50 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 25 Mar 2014 02:50:24 +0000 (23:50 -0300)
With -Wstrict-aliasing=2 we get the following warning:

libkmod/libkmod-signature.c:124:20: note: in expansion of macro 'get_unaligned'
  sig_len = be32toh(get_unaligned(&modsig->sig_len));

However there's nothing wrong with it. modsig->sig_len is uint32_t and
get_unaligned in this case returns uint32_t. There's notstrict aliasing
violation.

configure.ac

index e95942a07136a9308375002564d29d9d24ba6a29..f2070c61edbe1f5b1c8c7e9c2be8cc0e70f80b35 100644 (file)
@@ -164,7 +164,7 @@ CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\
                       -Wmissing-noreturn \
                       -Wshadow \
                       -Wendif-labels \
-                      -Wstrict-aliasing=2 \
+                      -Wstrict-aliasing=3 \
                       -Wwrite-strings \
                       -Wno-long-long \
                       -Wno-overlength-strings \