]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg BasePciCapLib: Fix VS build failure
authorLiming Gao <liming.gao@intel.com>
Tue, 29 May 2018 05:04:16 +0000 (13:04 +0800)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 29 May 2018 08:21:40 +0000 (10:21 +0200)
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>
OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c

index c059264b322d0da48270eb18666980091329e671..8b049889622caaa2190d3363abbeed486612ee1a 100644 (file)
@@ -613,8 +613,8 @@ PciCapListInit (
       }\r
 \r
       Status = InsertPciCap (OutCapList, CapHdrOffsets, PciCapExtended,\r
-                 ExtendedCapHdr.CapabilityId, ExtendedCapHdrOffset,\r
-                 ExtendedCapHdr.CapabilityVersion);\r
+                 (UINT16)ExtendedCapHdr.CapabilityId, ExtendedCapHdrOffset,\r
+                 (UINT8)ExtendedCapHdr.CapabilityVersion);\r
       if (RETURN_ERROR (Status)) {\r
         goto FreeCapHdrOffsets;\r
       }\r