summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/BasePciCapLib
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-05-29 13:04:16 +0800
committerLaszlo Ersek <lersek@redhat.com>2018-05-29 10:21:40 +0200
commit2d0c6692eee4b1e54714942098776eedfbcf38fa (patch)
tree4c4f50e41c8d5a86c193fdb35a96ab10cd856ae5 /OvmfPkg/Library/BasePciCapLib
parentd272449d9e1ed08aaeea83c2202913e6a523d8a8 (diff)
downloadedk2-2d0c6692eee4b1e54714942098776eedfbcf38fa.tar.gz
edk2-2d0c6692eee4b1e54714942098776eedfbcf38fa.tar.bz2
edk2-2d0c6692eee4b1e54714942098776eedfbcf38fa.zip
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 <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: remove whitespace after casts] Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/Library/BasePciCapLib')
-rw-r--r--OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c4
1 files 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;
}