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 <[email protected]>
Cc: Laszlo Ersek <[email protected]>
---
 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

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to