From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH] vhost-user-scsi: fix printf format warning
Date: Wed, 11 Dec 2019 20:34:44 +0100 [thread overview]
Message-ID: <7f69f423-e5ba-7aa8-a522-615a230ffbde@redhat.com> (raw)
In-Reply-To: <1576074210-52834-9-git-send-email-pbonzini@redhat.com>
On 11/12/2019 15.23, Paolo Bonzini wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Fixes:
> ../contrib/vhost-user-scsi/vhost-user-scsi.c:118:57: error: format specifies
> type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
> g_warning("Unable to determine cdb len (0x%02hhX)", cdb[0] >> 5);
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c b/contrib/vhost-user-scsi/vhost-user-scsi.c
> index 0fc14d7..7a1db16 100644
> --- a/contrib/vhost-user-scsi/vhost-user-scsi.c
> +++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
> @@ -115,7 +115,7 @@ static int get_cdb_len(uint8_t *cdb)
> case 4: return 16;
> case 5: return 12;
> }
> - g_warning("Unable to determine cdb len (0x%02hhX)", cdb[0] >> 5);
> + g_warning("Unable to determine cdb len (0x%02hhX)", (uint8_t)(cdb[0] >> 5));
> return -1;
> }
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2019-12-11 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 14:23 [PATCH] vhost-user-scsi: fix printf format warning Paolo Bonzini
2019-12-11 19:34 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f69f423-e5ba-7aa8-a522-615a230ffbde@redhat.com \
--to=thuth@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).