]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Fix VS2005 build warnings
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 25 Sep 2014 02:29:10 +0000 (02:29 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 25 Sep 2014 02:29:10 +0000 (02:29 +0000)
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

OvmfPkg/Library/LoadLinuxLib/Linux.c
OvmfPkg/PlatformPei/MemDetect.c
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
OvmfPkg/VirtioBlkDxe/VirtioBlk.c
OvmfPkg/VirtioNetDxe/DriverBinding.c
OvmfPkg/VirtioNetDxe/SnpGetStatus.c
OvmfPkg/VirtioScsiDxe/VirtioScsi.c

index 37b14f5612efe56df34a4032ced465ec10138922..353990b980c8222a4168c93b1d63cd03684bea6a 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -384,8 +384,8 @@ SetupLinuxMemmap (
 #ifdef MDE_CPU_IA32\r
   Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '3', '2');\r
 #else\r
-  Efi->efi_systab_hi = ((UINT64)(UINTN) gST) >> 32;\r
-  Efi->efi_memmap_hi = ((UINT64)(UINTN) MemoryMapPtr) >> 32;\r
+  Efi->efi_systab_hi = (UINT32) (((UINT64)(UINTN) gST) >> 32);\r
+  Efi->efi_memmap_hi = (UINT32) (((UINT64)(UINTN) MemoryMapPtr) >> 32);\r
   Efi->efi_loader_signature = SIGNATURE_32 ('E', 'L', '6', '4');\r
 #endif\r
 \r
index 4c22679c7af95aa4c67ea931f4fa7239eb29cd3e..bd7bb0227d8c338173780a41bc8ce3db163cfa1d 100644 (file)
@@ -56,7 +56,7 @@ GetSystemMemorySizeBelow4gb (
   Cmos0x34 = (UINT8) CmosRead8 (0x34);\r
   Cmos0x35 = (UINT8) CmosRead8 (0x35);\r
 \r
-  return (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);\r
+  return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);\r
 }\r
 \r
 \r
index 7827b72be17e4cf6a6bd259ad4c6b4dafcd1aba4..b56ece3931ed6693b73c9bc17b95e72c94bee7fd 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -880,7 +880,8 @@ Returns:
   if (Checksum != 0) {\r
     UINT16 Expected;\r
 \r
-    Expected = ((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff;\r
+    Expected =\r
+      (UINT16) (((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff);\r
 \r
     DEBUG ((EFI_D_INFO, "FV@%p Checksum is 0x%x, expected 0x%x\n",\r
             FwVolHeader, FwVolHeader->Checksum, Expected));\r
index 35fc88e35bfbe73cb263a36fde69bc1b6c152331..862957ce04448467534c8d4c26e73c768881cd66 100644 (file)
@@ -11,7 +11,7 @@
     synchronous requests and EFI_BLOCK_IO_PROTOCOL for now.\r
 \r
   Copyright (C) 2012, Red Hat, Inc.\r
-  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -770,8 +770,8 @@ VirtioBlkInit (
   Dev->BlockIoMedia.RemovableMedia   = FALSE;\r
   Dev->BlockIoMedia.MediaPresent     = TRUE;\r
   Dev->BlockIoMedia.LogicalPartition = FALSE;\r
-  Dev->BlockIoMedia.ReadOnly         = !!(Features & VIRTIO_BLK_F_RO);\r
-  Dev->BlockIoMedia.WriteCaching     = !!(Features & VIRTIO_BLK_F_FLUSH);\r
+  Dev->BlockIoMedia.ReadOnly         = (BOOLEAN) ((Features & VIRTIO_BLK_F_RO) != 0);\r
+  Dev->BlockIoMedia.WriteCaching     = (BOOLEAN) ((Features & VIRTIO_BLK_F_FLUSH) != 0);\r
   Dev->BlockIoMedia.BlockSize        = BlockSize;\r
   Dev->BlockIoMedia.IoAlign          = 0;\r
   Dev->BlockIoMedia.LastBlock        = DivU64x32 (NumSectors,\r
index 93995c6359eeee1ba0c486900e97be0d828eeb09..0ad39cf9729c0981922b4ab9069b7c64be1beb4e 100644 (file)
@@ -3,7 +3,7 @@
   Driver Binding code and its private helpers for the virtio-net driver.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -129,7 +129,7 @@ VirtioNetGetFeatures (
     if (EFI_ERROR (Status)) {\r
       goto YieldDevice;\r
     }\r
-    *MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);\r
+    *MediaPresent = (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);\r
   }\r
 \r
 YieldDevice:\r
index 4393d243a279bcdfb4fb4484ee25759cd6a94e69..694940ea1d976827bd890a734cb5e154b02a2470 100644 (file)
@@ -4,7 +4,7 @@
   any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -94,7 +94,8 @@ VirtioNetGetStatus (
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
-    Dev->Snm.MediaPresent = !!(LinkStatus & VIRTIO_NET_S_LINK_UP);\r
+    Dev->Snm.MediaPresent =\r
+      (BOOLEAN) ((LinkStatus & VIRTIO_NET_S_LINK_UP) != 0);\r
   }\r
 \r
   //\r
index e6154cd22e028830c1eb8d1445a9d0f5f4e95374..6b8ea601cd7f786c2741eb6e74f8a35cc5067e3b 100644 (file)
@@ -26,7 +26,7 @@
     unreasonable for now.\r
 \r
   Copyright (C) 2012, Red Hat, Inc.\r
-  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -748,7 +748,7 @@ VirtioScsiInit (
   if (EFI_ERROR (Status)) {\r
     goto Failed;\r
   }\r
-  Dev->InOutSupported = !!(Features & VIRTIO_SCSI_F_INOUT);\r
+  Dev->InOutSupported = (BOOLEAN) ((Features & VIRTIO_SCSI_F_INOUT) != 0);\r
 \r
   Status = VIRTIO_CFG_READ (Dev, MaxChannel, &MaxChannel);\r
   if (EFI_ERROR (Status)) {\r