public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] OvmfPkg BasePciCapLib: Fix VS build failure
@ 2018-05-29  5:04 Liming Gao
  2018-05-29  8:39 ` Laszlo Ersek
  0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2018-05-29  5:04 UTC (permalink / raw)
  To: edk2-devel; +Cc: Laszlo Ersek

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>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-29  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-29  5:04 [Patch] OvmfPkg BasePciCapLib: Fix VS build failure Liming Gao
2018-05-29  8:39 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox