All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 7/9] Add -Wmissing-format-attribute & fix problems it finds
Date: Mon, 02 Apr 2012 14:49:46 +0200	[thread overview]
Message-ID: <4F79A06A.9070602@suse.de> (raw)
In-Reply-To: <1333363816-1691-8-git-send-email-berrange@redhat.com>

Am 02.04.2012 12:50, schrieb Daniel P. Berrange:
> From: "Daniel P. Berrange" <berrange@redhat.com>
> 
> * configure: Add -Wmissing-format-attribute
> * hw/qxl.c: Add missing format attribute to qxl_guest_bug
>   and fix format specifiers in a caller of it
> * qtest.c: Add missing format attribute to qtest_send

There were patches for both of these on the list already:

http://patchwork.ozlabs.org/patch/149983/
http://patchwork.ozlabs.org/patch/149835/

Andreas

> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  configure |    1 +
>  hw/qxl.c  |    4 ++--
>  qtest.c   |    2 +-
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 8ee6cdb..3d47440 100755
> --- a/configure
> +++ b/configure
> @@ -1193,6 +1193,7 @@ gcc_flags="$gcc_flags -Wtrampolines"
>  gcc_flags="$gcc_flags -Wmissing-parameter-type"
>  gcc_flags="$gcc_flags -Wuninitialized"
>  gcc_flags="$gcc_flags -Wlogical-op"
> +gcc_flags="$gcc_flags -Wmissing-format-attribute"
>  
>  cat > $TMPC << EOF
>  int main(void) { return 0; }
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 47a162e..33b2288 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -124,7 +124,7 @@ static void qxl_reset_memslots(PCIQXLDevice *d);
>  static void qxl_reset_surfaces(PCIQXLDevice *d);
>  static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
>  
> -void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
> +GCC_FMT_ATTR(2, 3) void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
>  {
>      qxl_send_events(qxl, QXL_INTERRUPT_ERROR);
>      if (qxl->guestdebug) {
> @@ -1370,7 +1370,7 @@ async_common:
>      case QXL_IO_DESTROY_SURFACE_WAIT:
>          if (val >= NUM_SURFACES) {
>              qxl_guest_bug(d, "QXL_IO_DESTROY_SURFACE (async=%d):"
> -                             "%d >= NUM_SURFACES", async, val);
> +                             "%"PRIx64" >= NUM_SURFACES", async, val);
>              goto cancel_async;
>          }
>          qxl_spice_destroy_surface_wait(d, val, async);
> diff --git a/qtest.c b/qtest.c
> index cd7186c..2b71de3 100644
> --- a/qtest.c
> +++ b/qtest.c
> @@ -156,7 +156,7 @@ static void qtest_send_prefix(CharDriverState *chr)
>              tv.tv_sec, tv.tv_usec);
>  }
>  
> -static void qtest_send(CharDriverState *chr, const char *fmt, ...)
> +GCC_FMT_ATTR(2, 3) static void qtest_send(CharDriverState *chr, const char *fmt, ...)
>  {
>      va_list ap;
>      char buffer[1024];

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-04-02 12:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 10:50 [Qemu-devel] Fix enablement of some compiler warning flags & add some more Daniel P. Berrange
2012-04-02 10:50 ` [Qemu-devel] [PATCH 1/9] Move all compiler warning/optimization flags to the same place Daniel P. Berrange
2012-04-02 16:19   ` Stefan Weil
2012-04-02 10:50 ` [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support Daniel P. Berrange
2012-04-02 12:29   ` Peter Maydell
2012-04-02 16:28   ` Stefan Weil
2012-04-02 10:50 ` [Qemu-devel] [PATCH 3/9] Print out progress when checking compiler flags Daniel P. Berrange
2012-04-02 13:56   ` Peter Maydell
2012-04-02 14:00     ` Daniel P. Berrange
2012-04-02 16:31   ` Stefan Weil
2012-04-02 10:50 ` [Qemu-devel] [PATCH 4/9] Remove 4 MB stack frame usage from sheepdog Daniel P. Berrange
2012-04-02 10:50 ` [Qemu-devel] [PATCH 5/9] Add in a large number of extra GCC warnings Daniel P. Berrange
2012-04-02 10:50 ` [Qemu-devel] [PATCH 6/9] Fix bit test to use & instead of && and enable -Wlogical-op warning Daniel P. Berrange
2012-04-02 12:27   ` Peter Maydell
2012-04-02 16:02     ` Maksim Kozlov
2012-04-02 10:50 ` [Qemu-devel] [PATCH 7/9] Add -Wmissing-format-attribute & fix problems it finds Daniel P. Berrange
2012-04-02 12:49   ` Andreas Färber [this message]
2012-04-02 10:50 ` [Qemu-devel] [PATCH 8/9] Add more format string warning flags Daniel P. Berrange
2012-04-02 12:13   ` Peter Maydell
2012-04-02 12:17     ` Daniel P. Berrange
2012-04-02 14:04       ` Peter Maydell
2012-04-02 14:22         ` Daniel P. Berrange
2012-04-02 14:32           ` Peter Maydell
2012-04-02 14:34             ` Daniel P. Berrange
2012-04-02 10:50 ` [Qemu-devel] [PATCH 9/9] Add note about some other options potentially worth enabling Daniel P. Berrange
2012-04-02 16:48   ` Stefan Weil

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=4F79A06A.9070602@suse.de \
    --to=afaerber@suse.de \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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 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.