]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build-sys: suppress warnings of unused results 157/head
authorFilipe Brandenburger <filbranden@google.com>
Thu, 11 Jun 2015 05:40:31 +0000 (22:40 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Thu, 11 Jun 2015 05:45:06 +0000 (22:45 -0700)
Unfortunately, gcc keeps warning about those even when we use an
explicit (void) cast to indicate we are not interested in the result.

LLVM's clang does not have that issue and works fine with the casts.

GCC bug being tracked at:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Until that GCC bug is fixed (and the version with the fix is in
many/most distributions) or we switch to LLVM as the default compiler,
it looks like we'll have to disable this warning by default...

Tested by building files known to present warnings about unused results
without the suppression, confirmed that the warnings were no longer
present with this patch applied.

This partially reverts commit 00c11bc53a1d37 ("build-sys: don't suppress irrelevant warnings").

configure.ac

index 878b23b061a033ce1c9eaa777994682026275311..344bfe1e2171c67c74aa92bdc8b2e0c9651a8068 100644 (file)
@@ -173,6 +173,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wwrite-strings \
         -Wno-unused-parameter \
         -Wno-missing-field-initializers \
+        -Wno-unused-result \
         -Wno-format-signedness \
         -Werror=overflow \
         -Wdate-time \