Message ID | 20100905181435.GA24728@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index bbb5cba..6f41383 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -352,8 +352,9 @@ static int check_shm_size(IVShmemState *s, int fd) { if (s->ivshmem_size > buf.st_size) { fprintf(stderr, "IVSHMEM ERROR: Requested memory size greater"); - fprintf(stderr, " than shared object size (%" PRIu64 " > %ld)\n", - s->ivshmem_size, buf.st_size); + fprintf(stderr, " than shared object size " + "(%" PRIu64 " > %" PRIu64 "d)\n", + s->ivshmem_size, (uint64_t)buf.st_size); return -1; } else { return 0;
/scm/qemu/hw/ivshmem.c: In function ‘check_shm_size’: /scm/qemu/hw/ivshmem.c:356: error: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘__off64_t’ Fix by casting to u64. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- hw/ivshmem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)