From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EB8381A1EE9 for ; Wed, 21 Sep 2016 18:21:51 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP; 21 Sep 2016 18:21:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,376,1470726000"; d="scan'208";a="12361253" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga004.jf.intel.com with ESMTP; 21 Sep 2016 18:21:50 -0700 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Jordan Justen , Laszlo Ersek , Liming Gao Date: Thu, 22 Sep 2016 09:21:38 +0800 Message-Id: <1474507298-106676-1-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [PATCH v2] 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:21:52 -0000 V2: add the assert codes. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c index b369dc3..962087c 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -282,16 +282,17 @@ VirtioGpuSendCommand ( } Header->CtxId = 0; Header->Padding = 0; ASSERT (RequestSize >= sizeof *Header); + ASSERT (RequestSize <= MAX_UINT32); // // 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); // -- 1.9.5.msysgit.1