From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] block.c: Fix type of IoOperationType variable in send_qmp_error_event()
Date: Fri, 10 Oct 2014 13:40:54 -0600 [thread overview]
Message-ID: <54383646.1030401@redhat.com> (raw)
In-Reply-To: <1412969583-21045-1-git-send-email-peter.maydell@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
On 10/10/2014 01:33 PM, Peter Maydell wrote:
> The local variable 'ac' in send_qmp_error_event() is declared with the
> wrong type, which causes clang to complain when it is initialized
> and again when it is used:
>
> block.c:3655:20: warning: implicit conversion from enumeration type 'enum IoOperationType' to different enumeration type 'BlockErrorAction' (aka 'enum BlockErrorAction') [-Wenum-conversion]
> ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> ~ ^~~~~~~~~~~~~~~~~~~~~~
> block.c:3655:45: warning: implicit conversion from enumeration type 'enum IoOperationType' to different enumeration type 'BlockErrorAction' (aka 'enum BlockErrorAction') [-Wenum-conversion]
> ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
> ~ ^~~~~~~~~~~~~~~~~~~~~~~
> block.c:3656:62: warning: implicit conversion from enumeration type 'BlockErrorAction' (aka 'enum BlockErrorAction') to different enumeration type 'IoOperationType' (aka 'enum IoOperationType') [-Wenum-conversion]
> qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~
>
> Correct the type to IoOperationType, and rename the variable
> to 'optype' to match its correct type.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Bug introduced when this code was pulled out into its
> own function in commit c7c2ff0c7e5d2c04.
>
> block.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-10-10 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 19:33 [Qemu-devel] [PATCH] block.c: Fix type of IoOperationType variable in send_qmp_error_event() Peter Maydell
2014-10-10 19:40 ` Eric Blake [this message]
2014-10-22 12:44 ` Luiz Capitulino
2014-10-28 15:10 ` Stefan Hajnoczi
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=54383646.1030401@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).