From 268c02424b0b8078c15acdf73edbdeeb0dd80808 Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Thu, 19 Nov 2020 02:57:51 +0000 Subject: hw/usb: Fix bad printf format specifiers We should use printf format specifier "%u" instead of "%d" for argument of type "unsigned int". Reported-by: Euler Robot Signed-off-by: Alex Chen Message-id: 20201119025751.45750-1-alex.chen@huawei.com Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/usb/hcd-ehci.c') diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index aca018d8b5..212eb05d3d 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1192,7 +1192,7 @@ static int ehci_init_transfer(EHCIPacket *p) while (bytes > 0) { if (cpage > 4) { - fprintf(stderr, "cpage out of range (%d)\n", cpage); + fprintf(stderr, "cpage out of range (%u)\n", cpage); qemu_sglist_destroy(&p->sgl); return -1; } @@ -1598,7 +1598,7 @@ static int ehci_state_fetchentry(EHCIState *ehci, int async) default: /* TODO: handle FSTN type */ - fprintf(stderr, "FETCHENTRY: entry at %X is of type %d " + fprintf(stderr, "FETCHENTRY: entry at %X is of type %u " "which is not supported yet\n", entry, NLPTR_TYPE_GET(entry)); return -1; } -- cgit 1.4.1