From 2d0c6692eee4b1e54714942098776eedfbcf38fa Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Tue, 29 May 2018 13:04:16 +0800 Subject: OvmfPkg BasePciCapLib: Fix VS build failure 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 [lersek@redhat.com: remove whitespace after casts] Reviewed-by: 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 c059264b32..8b04988962 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; } -- cgit v1.2.3