qxl: Add missing GCC_FMT_ATTR and fix format specifier
PATCH 1/1 qxl: Add missing GCC_FMT_ATTR and fix format specifier
val is an uint64_t, therefore %d was not correct.
Cc Gerd Hoffmann <[email protected]>
Signed-off-by Stefan Weil <[email protected]>
--- hw/qxl.c | 2 +- hw/qxl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/qxl.c +1 -1
@@ -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);
hw/qxl.h +1 -1
@@ -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,
Signature · 1 line
1.7.2.5
Quoted 3 lines · Stefan Weil
val is an
uint64_t, therefore %d was not correct.Cc Gerd Hoffmann <[email protected]>
Waiting for Gerd's Ack.
Quoted 24 lines
Signed-off-by Stefan Weil <[email protected]>--- hw/qxl.c | 2 +- hw/qxl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/qxl.c +1
-1@@ -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);hw/qxl.h +0
-0
hw/qxl.h typedef struct PCIQXLDevice { · line 133
Quoted 8 lines
hw/qxl.h +1
-1@@ -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
Gerd Hoffmann
Acked-byQuoted 6 lines · Stefan Hajnoczi
Quoted 3 lines · Stefan Weil
Quoted 3 lines
val is an
uint64_t, therefore %d was not correct.Cc Gerd Hoffmann <[email protected]>Waiting for Gerd's Ack.
Acked-by Gerd Hoffmann <[email protected]>
cheers,
Gerd
Stefan Hajnoczi
AppliedQuoted 8 lines · Stefan Weil
val is an
uint64_t, therefore %d was not correct.Cc Gerd Hoffmann <[email protected]>Signed-off-by Stefan Weil <[email protected]>--- hw/qxl.c | 2 +- hw/qxl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan