From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 88B2F1A1F19 for ; Wed, 21 Sep 2016 18:06:45 -0700 (PDT) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DEF844E026; Thu, 22 Sep 2016 01:06:44 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-25.phx2.redhat.com [10.3.116.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8M16hVK011295; Wed, 21 Sep 2016 21:06:43 -0400 To: Dandan Bi References: <1474505679-81904-1-git-send-email-dandan.bi@intel.com> Cc: edk2-devel@ml01.01.org, Jordan Justen , Liming Gao From: Laszlo Ersek Message-ID: <6ed6d6fe-05bb-82dc-0ea5-c6aeeb83159d@redhat.com> Date: Thu, 22 Sep 2016 03:06:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1474505679-81904-1-git-send-email-dandan.bi@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 22 Sep 2016 01:06:44 +0000 (UTC) Subject: Re: [patch] OvmfPkg: Fix VS toolchain build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 01:06:45 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/22/16 02:54, Dandan Bi wrote: > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi > --- > OvmfPkg/VirtioGpuDxe/Commands.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c > index b369dc3..53a94ac 100644 > --- a/OvmfPkg/VirtioGpuDxe/Commands.c > +++ b/OvmfPkg/VirtioGpuDxe/Commands.c > @@ -287,11 +287,11 @@ VirtioGpuSendCommand ( > > // > // Compose the descriptor chain. > // > VirtioPrepare (&VgpuDev->Ring, &Indices); > - VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize, > + VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, (UINT32)RequestSize, > VRING_DESC_F_NEXT, &Indices); > VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response, > VRING_DESC_F_WRITE, &Indices); > > // > The patch is good, but I'd like to see another change: in the function, you see ASSERT (RequestSize >= sizeof *Header); a little bit higher up. Right under that, please add: ASSERT (RequestSize <= MAX_UINT32); And then the cast is fine. Can you please send v2 with this addition? Thank you for addressing this compiler warning (and sorry about the inconvenience with the VS build). Laszlo