qxl: Add missing GCC_FMT_ATTR and fix format specifier
authorStefan Weil <sw@weilnetz.de>
Sun, 1 Apr 2012 20:07:30 +0000 (22:07 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 20 Apr 2012 12:14:53 +0000 (13:14 +0100)
val is an uint64_t, therefore %d was not correct.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/qxl.c
hw/qxl.h

index db2318e293f057a22cf1a1a8abfe48fabe2319d3..c3540c3d5002fb2a964ed31ae03e940abdcbfb37 100644 (file)
--- 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);
index 11a0db3f7d56a8c40f38e34f4dc88d8e6c4718b9..cbb1e2d6d4944f9003202228b6443c615464a987 100644 (file)
--- 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,