* [Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings
@ 2013-09-14 15:55 Stefan Weil
2013-09-14 19:43 ` Michael Tokarev
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2013-09-14 15:55 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil
Compiler option -Wextra enables an additional set of compiler warnings.
Some of these warnings were already enabled explicitly in QEMU:
-Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and
-Wempty-body are now redundant and can be removed.
Others don't work with the current code and must be disabled to
avoid warnings: -Wno-missing-field-initializers, -Wno-override-init,
-Wno-sign-compare and -Wno-unused-parameter.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
v2: Removed unintentional change which added -fstack-protector-all
and rebased for latest QEMU.
configure | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 2b83936..ff89d60 100755
--- a/configure
+++ b/configure
@@ -310,7 +310,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="-Wall -Wextra -Wundef -Wwrite-strings -Wmissing-prototypes $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"
@@ -1236,12 +1236,16 @@ if test -z "$werror" ; then
fi
fi
-gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
-gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
-gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
+gcc_flags="-Wold-style-definition"
+gcc_flags="-Wformat-security -Wformat-y2k -Winit-self $gcc_flags"
+gcc_flags="-Wmissing-include-dirs -Wnested-externs $gcc_flags"
gcc_flags="-Wendif-labels $gcc_flags"
gcc_flags="-Wno-initializer-overrides $gcc_flags"
+gcc_flags="-Wno-missing-field-initializers $gcc_flags"
+gcc_flags="-Wno-override-init $gcc_flags"
+gcc_flags="-Wno-sign-compare $gcc_flags"
gcc_flags="-Wno-string-plus-int $gcc_flags"
+gcc_flags="-Wno-unused-parameter $gcc_flags"
# Note that we do not add -Werror to gcc_flags here, because that would
# enable it for all configure tests. If a configure test failed due
# to -Werror this would just silently disable some features,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings
2013-09-14 15:55 [Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings Stefan Weil
@ 2013-09-14 19:43 ` Michael Tokarev
0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2013-09-14 19:43 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
14.09.2013 19:55, Stefan Weil wrote:
> Compiler option -Wextra enables an additional set of compiler warnings.
>
> Some of these warnings were already enabled explicitly in QEMU:
> -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and
> -Wempty-body are now redundant and can be removed.
>
> Others don't work with the current code and must be disabled to
> avoid warnings: -Wno-missing-field-initializers, -Wno-override-init,
> -Wno-sign-compare and -Wno-unused-parameter.
Thanks, applied to the trivial-patches queue, and (minimally) verified
that the result builds on FreeBSD 9.
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-14 19:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14 15:55 [Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings Stefan Weil
2013-09-14 19:43 ` Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).