From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string
Date: Mon, 11 Oct 2010 15:09:43 +0200 [thread overview]
Message-ID: <4CB30C97.9040404@redhat.com> (raw)
In-Reply-To: <m3zkuksxgv.fsf@blackfin.pond.sub.org>
On 10/11/2010 02:52 PM, Markus Armbruster wrote:
> 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
>
Acked-By: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2010-10-11 13:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 12:52 [Qemu-devel] [PATCH] Suppress warning: zero-length gnu_printf format string Markus Armbruster
2010-10-11 13:09 ` Paolo Bonzini [this message]
2010-10-12 17:35 ` [Qemu-devel] " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CB30C97.9040404@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).