Revision: 16171
http://sourceforge.net/p/edk2/code/16171
Author: jljusten
Date: 2014-09-25 02:29:10 +0000 (Thu, 25 Sep 2014)
Log Message:
-----------
OvmfPkg: Fix VS2005 build warnings
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/OvmfPkg/Library/LoadLinuxLib/Linux.c
trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c
trunk/edk2/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
trunk/edk2/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
trunk/edk2/OvmfPkg/VirtioNetDxe/DriverBinding.c
trunk/edk2/OvmfPkg/VirtioNetDxe/SnpGetStatus.c
trunk/edk2/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
Modified: trunk/edk2/OvmfPkg/Library/LoadLinuxLib/Linux.c
===================================================================
--- trunk/edk2/OvmfPkg/Library/LoadLinuxLib/Linux.c 2014-09-25 02:29:00 UTC
(rev 16170)
+++ trunk/edk2/OvmfPkg/Library/LoadLinuxLib/Linux.c 2014-09-25 02:29:10 UTC
(rev 16171)
@@ -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 @@
#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
Modified: trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c
===================================================================
--- trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c 2014-09-25 02:29:00 UTC (rev
16170)
+++ trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c 2014-09-25 02:29:10 UTC (rev
16171)
@@ -56,7 +56,7 @@
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);
}
Modified: trunk/edk2/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
===================================================================
--- trunk/edk2/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
2014-09-25 02:29:00 UTC (rev 16170)
+++ trunk/edk2/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
2014-09-25 02:29:10 UTC (rev 16171)
@@ -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 @@
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));
Modified: trunk/edk2/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
===================================================================
--- trunk/edk2/OvmfPkg/VirtioBlkDxe/VirtioBlk.c 2014-09-25 02:29:00 UTC (rev
16170)
+++ trunk/edk2/OvmfPkg/VirtioBlkDxe/VirtioBlk.c 2014-09-25 02:29:10 UTC (rev
16171)
@@ -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 @@
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,
Modified: trunk/edk2/OvmfPkg/VirtioNetDxe/DriverBinding.c
===================================================================
--- trunk/edk2/OvmfPkg/VirtioNetDxe/DriverBinding.c 2014-09-25 02:29:00 UTC
(rev 16170)
+++ trunk/edk2/OvmfPkg/VirtioNetDxe/DriverBinding.c 2014-09-25 02:29:10 UTC
(rev 16171)
@@ -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 @@
if (EFI_ERROR (Status)) {
goto YieldDevice;
}
- *MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);
+ *MediaPresent = (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);
}
YieldDevice:
Modified: trunk/edk2/OvmfPkg/VirtioNetDxe/SnpGetStatus.c
===================================================================
--- trunk/edk2/OvmfPkg/VirtioNetDxe/SnpGetStatus.c 2014-09-25 02:29:00 UTC
(rev 16170)
+++ trunk/edk2/OvmfPkg/VirtioNetDxe/SnpGetStatus.c 2014-09-25 02:29:10 UTC
(rev 16171)
@@ -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 @@
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);
}
//
Modified: trunk/edk2/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
===================================================================
--- trunk/edk2/OvmfPkg/VirtioScsiDxe/VirtioScsi.c 2014-09-25 02:29:00 UTC
(rev 16170)
+++ trunk/edk2/OvmfPkg/VirtioScsiDxe/VirtioScsi.c 2014-09-25 02:29:10 UTC
(rev 16171)
@@ -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 @@
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)) {
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits