summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKevin Wolf2013-02-22 21:08:51 +0100
committerAnthony Liguori2013-02-22 21:48:24 +0100
commitc95e3080a44946ac5739542b549f5a10ee4ec377 (patch)
tree9e2912939a2bb74bb52f0572a7c8e5beff5c3253 /configure
parentui/gtk: require at least GTK 2.18 and VTE 0.26 (diff)
downloadqemu-c95e3080a44946ac5739542b549f5a10ee4ec377.tar.gz
qemu-c95e3080a44946ac5739542b549f5a10ee4ec377.tar.xz
qemu-c95e3080a44946ac5739542b549f5a10ee4ec377.zip
Reenable -Wstrict-prototypes
One part of this patch reverts commit 22bc9a46, which disabled the warning. The rest of it deals with the warning by adding a #pragma for newer gcc and by disabling -Werror for compilers that can't deal with the #pragma. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1361563731-13307-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure b/configure
index 0eb25dd77c..544c3f612c 100755
--- a/configure
+++ b/configure
@@ -284,7 +284,7 @@ sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
# default flags for all hosts
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
-QEMU_CFLAGS="-Wredundant-decls $QEMU_CFLAGS"
+QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
if test "$debug_info" = "yes"; then
@@ -3115,20 +3115,27 @@ if compile_prog "" "" ; then
fi
########################################
-# check whether we can disable the -Wunused-but-set-variable
-# option with a pragma (this is needed to silence a warning in
-# some versions of the valgrind VALGRIND_STACK_DEREGISTER macro.)
-# This test has to be compiled with -Werror as otherwise an
-# unknown pragma is only a warning.
+# check whether we can disable warning option with a pragma (this is needed
+# to silence warnings in the headers of some versions of external libraries).
+# This test has to be compiled with -Werror as otherwise an unknown pragma is
+# only a warning.
+#
+# If we can't selectively disable warning in the code, disable -Werror so that
+# the build doesn't fail anyway.
+
pragma_disable_unused_but_set=no
cat > $TMPC << EOF
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+
int main(void) {
return 0;
}
EOF
if compile_prog "-Werror" "" ; then
pragma_diagnostic_available=yes
+else
+ werror=no
fi
########################################