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
This commit is contained in:
Jordan Justen 2014-09-25 02:29:10 +00:00 committed by jljusten
parent ce88384500
commit c404616199
7 changed files with 17 additions and 15 deletions

View File

@ -1,6 +1,6 @@
/** @file /** @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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -384,8 +384,8 @@ SetupLinuxMemmap (
#ifdef MDE_CPU_IA32 #ifdef MDE_CPU_IA32
Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '3', '2'); Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '3', '2');
#else #else
Efi->efi_systab_hi = ((UINT64)(UINTN) gST) >> 32; Efi->efi_systab_hi = (UINT32) (((UINT64)(UINTN) gST) >> 32);
Efi->efi_memmap_hi = ((UINT64)(UINTN) MemoryMapPtr) >> 32; Efi->efi_memmap_hi = (UINT32) (((UINT64)(UINTN) MemoryMapPtr) >> 32);
Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '6', '4'); Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '6', '4');
#endif #endif

View File

@ -56,7 +56,7 @@ GetSystemMemorySizeBelow4gb (
Cmos0x34 = (UINT8) CmosRead8 (0x34); Cmos0x34 = (UINT8) CmosRead8 (0x34);
Cmos0x35 = (UINT8) CmosRead8 (0x35); Cmos0x35 = (UINT8) CmosRead8 (0x35);
return (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
} }

View File

@ -1,6 +1,6 @@
/**@file /**@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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -880,7 +880,8 @@ Returns:
if (Checksum != 0) { if (Checksum != 0) {
UINT16 Expected; 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", DEBUG ((EFI_D_INFO, "FV@%p Checksum is 0x%x, expected 0x%x\n",
FwVolHeader, FwVolHeader->Checksum, Expected)); FwVolHeader, FwVolHeader->Checksum, Expected));

View File

@ -11,7 +11,7 @@
synchronous requests and EFI_BLOCK_IO_PROTOCOL for now. synchronous requests and EFI_BLOCK_IO_PROTOCOL for now.
Copyright (C) 2012, Red Hat, Inc. 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 This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this under the terms and conditions of the BSD License which accompanies this
@ -770,8 +770,8 @@ VirtioBlkInit (
Dev->BlockIoMedia.RemovableMedia = FALSE; Dev->BlockIoMedia.RemovableMedia = FALSE;
Dev->BlockIoMedia.MediaPresent = TRUE; Dev->BlockIoMedia.MediaPresent = TRUE;
Dev->BlockIoMedia.LogicalPartition = FALSE; Dev->BlockIoMedia.LogicalPartition = FALSE;
Dev->BlockIoMedia.ReadOnly = !!(Features & VIRTIO_BLK_F_RO); Dev->BlockIoMedia.ReadOnly = (BOOLEAN) ((Features & VIRTIO_BLK_F_RO) != 0);
Dev->BlockIoMedia.WriteCaching = !!(Features & VIRTIO_BLK_F_FLUSH); Dev->BlockIoMedia.WriteCaching = (BOOLEAN) ((Features & VIRTIO_BLK_F_FLUSH) != 0);
Dev->BlockIoMedia.BlockSize = BlockSize; Dev->BlockIoMedia.BlockSize = BlockSize;
Dev->BlockIoMedia.IoAlign = 0; Dev->BlockIoMedia.IoAlign = 0;
Dev->BlockIoMedia.LastBlock = DivU64x32 (NumSectors, Dev->BlockIoMedia.LastBlock = DivU64x32 (NumSectors,

View File

@ -3,7 +3,7 @@
Driver Binding code and its private helpers for the virtio-net driver. Driver Binding code and its private helpers for the virtio-net driver.
Copyright (C) 2013, Red Hat, Inc. 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 This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this under the terms and conditions of the BSD License which accompanies this
@ -129,7 +129,7 @@ VirtioNetGetFeatures (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto YieldDevice; goto YieldDevice;
} }
*MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP); *MediaPresent = (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);
} }
YieldDevice: YieldDevice:

View File

@ -4,7 +4,7 @@
any. any.
Copyright (C) 2013, Red Hat, Inc. 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 This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this under the terms and conditions of the BSD License which accompanies this
@ -94,7 +94,8 @@ VirtioNetGetStatus (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Exit; goto Exit;
} }
Dev->Snm.MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP); Dev->Snm.MediaPresent =
(BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);
} }
// //

View File

@ -26,7 +26,7 @@
unreasonable for now. unreasonable for now.
Copyright (C) 2012, Red Hat, Inc. 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 This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this under the terms and conditions of the BSD License which accompanies this
@ -748,7 +748,7 @@ VirtioScsiInit (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Failed; 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); Status = VIRTIO_CFG_READ (Dev, MaxChannel, &MaxChannel);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {