All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Suppress warning: zero-length gnu_printf format string
@ 2010-10-11 12:52 Markus Armbruster
  2010-10-11 13:09 ` [Qemu-devel] " Paolo Bonzini
  2010-10-12 17:35 ` Blue Swirl
  0 siblings, 2 replies; 17+ messages in thread
From: Markus Armbruster @ 2010-10-11 12:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

Warns about this line in check-qjson.c:
    QObject *obj = qobject_from_json("");

The obvious fix (add -Wno-format-zero-length to gcc_flags) doesn't
work, because -Wall switches it on again.  Fix by putting configured
flags last.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 configure |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index d303061..3a12f92 100755
--- a/configure
+++ b/configure
@@ -146,7 +146,8 @@ QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS"
 LDFLAGS="-g $LDFLAGS"
 
 gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
-gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
+gcc_flags="-Wformat-security -Wformat-y2k -Wno-format-zero-length $gcc_flags"
+gcc_flags="-Winit-self -Wignored-qualifiers $gcc_flags"
 gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags"
 gcc_flags="-fstack-protector-all $gcc_flags"
 cat > $TMPC << EOF
@@ -154,7 +155,7 @@ int main(void) { return 0; }
 EOF
 for flag in $gcc_flags; do
     if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then
-	QEMU_CFLAGS="$flag $QEMU_CFLAGS"
+	QEMU_CFLAGS="$QEMU_CFLAGS $flag"
     fi
 done
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-10-20 20:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-11 12:52 [Qemu-devel] [PATCH] Suppress warning: zero-length gnu_printf format string Markus Armbruster
2010-10-11 13:09 ` [Qemu-devel] " Paolo Bonzini
2010-10-12 17:35 ` Blue Swirl
2010-10-13  7:19   ` Markus Armbruster
2010-10-13 18:57     ` Blue Swirl
2010-10-14  9:19       ` [Qemu-devel] [PATCH] configure: Support disabling warnings in $gcc_flags Markus Armbruster
2010-10-20 20:55         ` [Qemu-devel] " Blue Swirl
2010-10-14  9:20       ` [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string Markus Armbruster
2010-10-14 16:38         ` Blue Swirl
2010-10-14 17:52           ` Paolo Bonzini
2010-10-14 17:59             ` Blue Swirl
2010-10-15  1:33               ` Paolo Bonzini
2010-10-15 17:41                 ` Blue Swirl
2010-10-16  0:37                   ` Paolo Bonzini
2010-10-16 16:28                     ` Blue Swirl
2010-10-16 17:42                       ` [Qemu-devel] [PATCH] Silence compiler warning in json test case Jan Kiszka
2010-10-18 14:14                         ` Luiz Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.