From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 EA174203B8589 for ; Mon, 28 May 2018 22:04:22 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2018 22:04:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,455,1520924400"; d="scan'208";a="53038522" Received: from shwde7172.ccr.corp.intel.com ([10.239.158.42]) by FMSMGA003.fm.intel.com with ESMTP; 28 May 2018 22:04:21 -0700 From: Liming Gao To: edk2-devel@lists.01.org Cc: Laszlo Ersek Date: Tue, 29 May 2018 13:04:16 +0800 Message-Id: <1527570256-16140-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [Patch] OvmfPkg BasePciCapLib: Fix VS build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2018 05:04:23 -0000 Fix VS warning C4244: 'function': conversion from 'UINT32' to 'UINT16', possible loss of data. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Laszlo Ersek --- OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c b/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c index c059264..54e7409 100644 --- a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c +++ b/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c @@ -613,8 +613,8 @@ PciCapListInit ( } Status = InsertPciCap (OutCapList, CapHdrOffsets, PciCapExtended, - ExtendedCapHdr.CapabilityId, ExtendedCapHdrOffset, - ExtendedCapHdr.CapabilityVersion); + (UINT16) ExtendedCapHdr.CapabilityId, ExtendedCapHdrOffset, + (UINT8) ExtendedCapHdr.CapabilityVersion); if (RETURN_ERROR (Status)) { goto FreeCapHdrOffsets; } -- 2.8.0.windows.1