summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-07-14 17:34:38 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-07-18 19:23:22 +0200
commitf982bb8d627ed37ee14b9f0b8bc6a0b3a22c75e5 (patch)
treef7245cf7d891cc9449de7b110b5cb05a0d17f2ff
parent09a85f6eebf208e8c5435130e11caf0843cb7219 (diff)
downloadedk2-f982bb8d627ed37ee14b9f0b8bc6a0b3a22c75e5.zip
edk2-f982bb8d627ed37ee14b9f0b8bc6a0b3a22c75e5.tar.gz
edk2-f982bb8d627ed37ee14b9f0b8bc6a0b3a22c75e5.tar.bz2
OvmfPkg/PciHostBridgeLib: silence IA32 VS2015x86 warnings
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 <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
-rw-r--r--OvmfPkg/Library/PciHostBridgeLib/XenSupport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c b/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c
index 2189663..31c63ae 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;