Reviewed-by: Ruiyu Ni <[email protected]> Thanks, Ray
> 在 2016年7月15日,下午4:14,Laszlo Ersek <[email protected]> 写道: > > When compiling "OvmfPkg\Library\PciHostBridgeLib\XenSupport.c" for IA32, > the VS2015x86 compiler emits the following: > >> XenSupport.c(41): error C2220: warning treated as error - no 'object' >> file generated >> XenSupport.c(41): warning C4244: 'function': conversion from 'UINT64' to >> 'UINTN', possible loss of data >> XenSupport.c(48): warning C4244: 'function': conversion from 'UINT64' to >> 'UINTN', possible loss of data >> XenSupport.c(49): warning C4244: 'function': conversion from 'UINT64' to >> 'UINTN', possible loss of data >> XenSupport.c(50): warning C4244: 'function': conversion from 'UINT64' to >> 'UINTN', possible loss of data >> XenSupport.c(222): warning C4244: 'function': conversion from 'UINT64' >> to 'UINTN', possible loss of data >> XenSupport.c(241): warning C4244: 'function': conversion from 'UINT64' >> to 'UINTN', possible loss of data > > PciLib functions take UINTN addresses that were encoded with the > PCI_LIB_ADDRESS() macro. We carry addresses from the macro invocations to > the function calls in two UINT64 variables however. This loses no data, > but it alerts VS2015x86. Change the variable types to UINTN. > > Cc: Jordan Justen <[email protected]> > Cc: Ruiyu Ni <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek <[email protected]> > --- > OvmfPkg/Library/PciHostBridgeLib/XenSupport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c > b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c > index 21896637e051..31c63ae19e0a 100644 > --- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c > +++ b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c > @@ -30,7 +30,7 @@ > STATIC > VOID > PcatPciRootBridgeBarExisted ( > - IN UINT64 Address, > + IN UINTN Address, > OUT UINT32 *OriginalValue, > OUT UINT32 *Value > ) > @@ -180,7 +180,7 @@ ScanForRootBridges ( > UINT8 Device; > UINT8 Function; > UINTN NumberOfDevices; > - UINT64 Address; > + UINTN Address; > PCI_TYPE01 Pci; > UINT64 Attributes; > UINT64 Base; > -- > 1.8.3.1 > > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

