qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix non-portable format string in usb-ccid.c
@ 2011-04-04  4:48 David Gibson
  2011-04-04 12:43 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2011-04-04  4:48 UTC (permalink / raw)
  To: qemu-devel

At one point, usb-ccid.c attempts to use a %lX format specifier to print
a uint64_t, which is only correct on some host platforms.  This patch
corrects the statement to use the stdint specified PRIX64 constant instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/usb-ccid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c
index 723b2e3..44156cc 100644
--- a/hw/usb-ccid.c
+++ b/hw/usb-ccid.c
@@ -1199,7 +1199,7 @@ void ccid_card_card_error(CCIDCardState *card, uint64_t error)
 
     s->bmCommandStatus = COMMAND_STATUS_FAILED;
     s->last_answer_error = error;
-    DPRINTF(s, 1, "VSC_Error: %lX\n", s->last_answer_error);
+    DPRINTF(s, 1, "VSC_Error: %" PRIX64 "\n", s->last_answer_error);
     /* TODO: these error's should be more verbose and propogated to the guest.*/
     /*
      * We flush all pending answers on CardRemove message in ccid-card-passthru,
-- 
1.7.1

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

* Re: [Qemu-devel] [PATCH] Fix non-portable format string in usb-ccid.c
  2011-04-04  4:48 [Qemu-devel] [PATCH] Fix non-portable format string in usb-ccid.c David Gibson
@ 2011-04-04 12:43 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2011-04-04 12:43 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-devel

On Mon, Apr 04, 2011 at 02:48:08PM +1000, David Gibson wrote:
> At one point, usb-ccid.c attempts to use a %lX format specifier to print
> a uint64_t, which is only correct on some host platforms.  This patch
> corrects the statement to use the stdint specified PRIX64 constant instead.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  hw/usb-ccid.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied.

> diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c
> index 723b2e3..44156cc 100644
> --- a/hw/usb-ccid.c
> +++ b/hw/usb-ccid.c
> @@ -1199,7 +1199,7 @@ void ccid_card_card_error(CCIDCardState *card, uint64_t error)
>  
>      s->bmCommandStatus = COMMAND_STATUS_FAILED;
>      s->last_answer_error = error;
> -    DPRINTF(s, 1, "VSC_Error: %lX\n", s->last_answer_error);
> +    DPRINTF(s, 1, "VSC_Error: %" PRIX64 "\n", s->last_answer_error);
>      /* TODO: these error's should be more verbose and propogated to the guest.*/
>      /*
>       * We flush all pending answers on CardRemove message in ccid-card-passthru,
> -- 
> 1.7.1
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

end of thread, other threads:[~2011-04-04 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04  4:48 [Qemu-devel] [PATCH] Fix non-portable format string in usb-ccid.c David Gibson
2011-04-04 12:43 ` Aurelien Jarno

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