qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qxl: Add missing GCC_FMT_ATTR and fix format specifier
@ 2012-04-01 20:07 Stefan Weil
  2012-04-02 13:05 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2012-04-01 20:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Gerd Hoffmann

val is an uint64_t, therefore %d was not correct.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/qxl.c |    2 +-
 hw/qxl.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 47a162e..85028dd 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -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);
+                             "%" PRIu64 " >= NUM_SURFACES", async, val);
             goto cancel_async;
         }
         qxl_spice_destroy_surface_wait(d, val, async);
diff --git a/hw/qxl.h b/hw/qxl.h
index 11a0db3..cbb1e2d 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -127,7 +127,7 @@ typedef struct PCIQXLDevice {
 
 /* qxl.c */
 void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
-void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...);
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...) GCC_FMT_ATTR(2, 3);
 
 void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
                            struct QXLRect *area, struct QXLRect *dirty_rects,
-- 
1.7.2.5

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] qxl: Add missing GCC_FMT_ATTR and fix format specifier
  2012-04-01 20:07 [Qemu-devel] [PATCH] qxl: Add missing GCC_FMT_ATTR and fix format specifier Stefan Weil
@ 2012-04-02 13:05 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2012-04-02 13:05 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, Gerd Hoffmann

On Sun, Apr 01, 2012 at 10:07:30PM +0200, Stefan Weil wrote:
> val is an uint64_t, therefore %d was not correct.
> 
> Cc: Gerd Hoffmann <kraxel@redhat.com>

Waiting for Gerd's Ack.

> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  hw/qxl.c |    2 +-
>  hw/qxl.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/qxl.c b/hw/qxl.c
> index 47a162e..85028dd 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -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);
> +                             "%" PRIu64 " >= NUM_SURFACES", async, val);
>              goto cancel_async;
>          }
>          qxl_spice_destroy_surface_wait(d, val, async);
> diff --git a/hw/qxl.h b/hw/qxl.h
> index 11a0db3..cbb1e2d 100644
> --- a/hw/qxl.h
> +++ b/hw/qxl.h
> @@ -127,7 +127,7 @@ typedef struct PCIQXLDevice {
>  
>  /* qxl.c */
>  void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
> -void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...);
> +void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...) GCC_FMT_ATTR(2, 3);
>  
>  void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
>                             struct QXLRect *area, struct QXLRect *dirty_rects,

For two unrelated fixes I would do separate commits but don't worry
about resending.

Stefan

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

end of thread, other threads:[~2012-04-02 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01 20:07 [Qemu-devel] [PATCH] qxl: Add missing GCC_FMT_ATTR and fix format specifier Stefan Weil
2012-04-02 13:05 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

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).