summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-09-25 02:29:10 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-25 02:29:10 +0000
commitc404616199df383226df1b70940008c01cfaec81 (patch)
tree72e1e0ee3872568925a459ecd410a1965f0f9173
parentce88384500b3fb82c324ebf8553bfc55aedb3bc2 (diff)
OvmfPkg: Fix VS2005 build warnings
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16171 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--OvmfPkg/Library/LoadLinuxLib/Linux.c6
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c2
-rw-r--r--OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c5
-rw-r--r--OvmfPkg/VirtioBlkDxe/VirtioBlk.c6
-rw-r--r--OvmfPkg/VirtioNetDxe/DriverBinding.c4
-rw-r--r--OvmfPkg/VirtioNetDxe/SnpGetStatus.c5
-rw-r--r--OvmfPkg/VirtioScsiDxe/VirtioScsi.c4
7 files changed, 17 insertions, 15 deletions
diff --git a/OvmfPkg/Library/LoadLinuxLib/Linux.c b/OvmfPkg/Library/LoadLinuxLib/Linux.c
index 37b14f561..353990b98 100644
--- a/OvmfPkg/Library/LoadLinuxLib/Linux.c
+++ b/OvmfPkg/Library/LoadLinuxLib/Linux.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -384,8 +384,8 @@ SetupLinuxMemmap (
#ifdef MDE_CPU_IA32
Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '3', '2');
#else
- Efi->efi_systab_hi = ((UINT64)(UINTN) gST) >> 32;
- Efi->efi_memmap_hi = ((UINT64)(UINTN) MemoryMapPtr) >> 32;
+ Efi->efi_systab_hi = (UINT32) (((UINT64)(UINTN) gST) >> 32);
+ Efi->efi_memmap_hi = (UINT32) (((UINT64)(UINTN) MemoryMapPtr) >> 32);
Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '6', '4');
#endif
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 4c22679c7..bd7bb0227 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -56,7 +56,7 @@ GetSystemMemorySizeBelow4gb (
Cmos0x34 = (UINT8) CmosRead8 (0x34);
Cmos0x35 = (UINT8) CmosRead8 (0x35);
- return (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
+ return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
}
diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
index 7827b72be..b56ece393 100644
--- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
+++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -880,7 +880,8 @@ Returns:
if (Checksum != 0) {
UINT16 Expected;
- Expected = ((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff;
+ Expected =
+ (UINT16) (((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff);
DEBUG ((EFI_D_INFO, "FV@%p Checksum is 0x%x, expected 0x%x\n",
FwVolHeader, FwVolHeader->Checksum, Expected));
diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
index 35fc88e35..862957ce0 100644
--- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
+++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
@@ -11,7 +11,7 @@
synchronous requests and EFI_BLOCK_IO_PROTOCOL for now.
Copyright (C) 2012, Red Hat, Inc.
- Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -770,8 +770,8 @@ VirtioBlkInit (
Dev->BlockIoMedia.RemovableMedia = FALSE;
Dev->BlockIoMedia.MediaPresent = TRUE;
Dev->BlockIoMedia.LogicalPartition = FALSE;
- Dev->BlockIoMedia.ReadOnly = !!(Features & VIRTIO_BLK_F_RO);
- Dev->BlockIoMedia.WriteCaching = !!(Features & VIRTIO_BLK_F_FLUSH);
+ Dev->BlockIoMedia.ReadOnly = (BOOLEAN) ((Features & VIRTIO_BLK_F_RO) != 0);
+ Dev->BlockIoMedia.WriteCaching = (BOOLEAN) ((Features & VIRTIO_BLK_F_FLUSH) != 0);
Dev->BlockIoMedia.BlockSize = BlockSize;
Dev->BlockIoMedia.IoAlign = 0;
Dev->BlockIoMedia.LastBlock = DivU64x32 (NumSectors,
diff --git a/OvmfPkg/VirtioNetDxe/DriverBinding.c b/OvmfPkg/VirtioNetDxe/DriverBinding.c
index 93995c635..0ad39cf97 100644
--- a/OvmfPkg/VirtioNetDxe/DriverBinding.c
+++ b/OvmfPkg/VirtioNetDxe/DriverBinding.c
@@ -3,7 +3,7 @@
Driver Binding code and its private helpers for the virtio-net driver.
Copyright (C) 2013, Red Hat, Inc.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -129,7 +129,7 @@ VirtioNetGetFeatures (
if (EFI_ERROR (Status)) {
goto YieldDevice;
}
- *MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);
+ *MediaPresent = (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);
}
YieldDevice:
diff --git a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c
index 4393d243a..694940ea1 100644
--- a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c
+++ b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c
@@ -4,7 +4,7 @@
any.
Copyright (C) 2013, Red Hat, Inc.
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -94,7 +94,8 @@ VirtioNetGetStatus (
if (EFI_ERROR (Status)) {
goto Exit;
}
- Dev->Snm.MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);
+ Dev->Snm.MediaPresent =
+ (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);
}
//
diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
index e6154cd22..6b8ea601c 100644
--- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
+++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
@@ -26,7 +26,7 @@
unreasonable for now.
Copyright (C) 2012, Red Hat, Inc.
- Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -748,7 +748,7 @@ VirtioScsiInit (
if (EFI_ERROR (Status)) {
goto Failed;
}
- Dev->InOutSupported = !!(Features & VIRTIO_SCSI_F_INOUT);
+ Dev->InOutSupported = (BOOLEAN) ((Features & VIRTIO_SCSI_F_INOUT) != 0);
Status = VIRTIO_CFG_READ (Dev, MaxChannel, &MaxChannel);
if (EFI_ERROR (Status)) {