From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcg3i-0003jF-Jr for qemu-devel@nongnu.org; Fri, 10 Oct 2014 15:41:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xcg3e-0003rm-8U for qemu-devel@nongnu.org; Fri, 10 Oct 2014 15:41:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xcg3e-0003rh-0x for qemu-devel@nongnu.org; Fri, 10 Oct 2014 15:40:58 -0400 Message-ID: <54383646.1030401@redhat.com> Date: Fri, 10 Oct 2014 13:40:54 -0600 From: Eric Blake MIME-Version: 1.0 References: <1412969583-21045-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1412969583-21045-1-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Xh7G53eWBKBJXcMO2Msk3TWtBpcojGq43" Subject: Re: [Qemu-devel] [PATCH] block.c: Fix type of IoOperationType variable in send_qmp_error_event() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Kevin Wolf , Luiz Capitulino , Stefan Hajnoczi , patches@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Xh7G53eWBKBJXcMO2Msk3TWtBpcojGq43 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: >=20 > block.c:3655:20: warning: implicit conversion from enumeration type 'en= um IoOperationType' to different enumeration type 'BlockErrorAction' (aka= 'enum BlockErrorAction') [-Wenum-conversion] > ac =3D is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE; > ~ ^~~~~~~~~~~~~~~~~~~~~~ > block.c:3655:45: warning: implicit conversion from enumeration type 'en= um IoOperationType' to different enumeration type 'BlockErrorAction' (aka= 'enum BlockErrorAction') [-Wenum-conversion] > ac =3D is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE; > ~ ^~~~~~~~~~~~~~~~~~~~~~~ > block.c:3656:62: warning: implicit conversion from enumeration type 'Bl= ockErrorAction' (aka 'enum BlockErrorAction') to different enumeration ty= pe 'IoOperationType' (aka 'enum IoOperationType') [-Wenum-conversion] > qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action= , > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ >=20 > Correct the type to IoOperationType, and rename the variable > to 'optype' to match its correct type. >=20 > Signed-off-by: Peter Maydell > --- > Bug introduced when this code was pulled out into its > own function in commit c7c2ff0c7e5d2c04. >=20 > block.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Xh7G53eWBKBJXcMO2Msk3TWtBpcojGq43 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUODZGAAoJEKeha0olJ0NqlDMH+wWLQXcSM2iqY/i6TocxuPKg vtjXIdHROohGrutGMa/66fn8WfGCkjX5WokbRWVvuMHB9R3lm7pYJtcnOWdGOisz yEhGM000p6SYVdTeAszQDLgTDkn7ipc1nY1gU2B3keSGowgKO1JRFMzRWulB7XxU Ycpg1D9NXZat3cqYfRuL6maBnwd/Mdte287kWi6mFVT8xCWAFiF9QmmR7LqRgAmu VDBHkkjZhBXOSNzSsbSbhtQkXBVVWNIWMdfHzGVZc9zuM05QB6jdAmYJX2x/ZE17 /bRNoNe5qbQ65P0AZ1E9GwTiJ6OcrV7wTqyXumlB/98fz9I/5BmUJuPA5FYmqLI= =ST+3 -----END PGP SIGNATURE----- --Xh7G53eWBKBJXcMO2Msk3TWtBpcojGq43--