From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj8PV-0007Cn-Vp for qemu-devel@nongnu.org; Tue, 28 Oct 2014 11:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj8PR-0001Xz-DR for qemu-devel@nongnu.org; Tue, 28 Oct 2014 11:10:13 -0400 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:48223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj8PR-0001XU-6d for qemu-devel@nongnu.org; Tue, 28 Oct 2014 11:10:09 -0400 Received: by mail-la0-f42.google.com with SMTP id gq15so807267lab.29 for ; Tue, 28 Oct 2014 08:10:08 -0700 (PDT) Date: Tue, 28 Oct 2014 15:10:04 +0000 From: Stefan Hajnoczi Message-ID: <20141028151004.GI22805@stefanha-thinkpad.redhat.com> References: <1412969583-21045-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="o7gdRJTuwFmWapyH" Content-Disposition: inline In-Reply-To: <1412969583-21045-1-git-send-email-peter.maydell@linaro.org> 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 Cc: Kevin Wolf , patches@linaro.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Luiz Capitulino --o7gdRJTuwFmWapyH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 10, 2014 at 08:33:03PM +0100, 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 'enum= IoOperationType' to different enumeration type 'BlockErrorAction' (aka 'en= um 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 'enum= IoOperationType' to different enumeration type 'BlockErrorAction' (aka 'en= um 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 'Bloc= kErrorAction' (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, > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ >=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(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --o7gdRJTuwFmWapyH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUT7HMAAoJEJykq7OBq3PI+bAH/A8Cz/BPCAw5vPvqAPkU7EB3 D/Z7vBCFeY9uBfXcWAcRVKrkxiHuzc0Xl8T4UQANBUJ4s0YNZq7DLSqtCRmbsdlJ 0Yss6Rn0YDdycP/KQXTWMJCHI/vAsHEtIVLEvreRx/Q1mT8D7Vn0DfTxTRqAFlqd RnapZyOvceowPZuE4x+x3zw+kv11w1N536medwatv2M2wor4Pdg2hnBCR3ROwq8k veSHQzWTqjE/Z7kOzsiPzcYk4VItWWsq1EcQGA0G90hbZkjI14ZVYuz4+eikMIhB d/kV2jbxVtE1gax4VE2RQIO9RRbkivmSvmbEXlMD3tAEfebhFTWAST4EElCPhHw= =9FZ6 -----END PGP SIGNATURE----- --o7gdRJTuwFmWapyH--