]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VirtioNetDxe: Fix build errors on VS2012 (IA32 & X64)
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 14 Jun 2013 07:41:05 +0000 (07:41 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Jun 2013 07:41:05 +0000 (07:41 +0000)
These changes were needed in addition to the silence.patch
that Laszlo posted on May 28.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14420 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/VirtioNetDxe/SnpGetStatus.c
OvmfPkg/VirtioNetDxe/SnpReceive.c
OvmfPkg/VirtioNetDxe/SnpTransmit.c

index ce6a7295fed6fa4a33d8df469d2fdf3e5bf148dd..eabcf93c4b504d7ad0901e0cb561905a37911558 100644 (file)
@@ -4,7 +4,7 @@
   any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, 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
@@ -136,12 +136,12 @@ VirtioNetGetStatus (
 \r
       UsedElemIdx = Dev->TxLastUsed++ % Dev->TxRing.QueueSize;\r
       DescIdx = Dev->TxRing.Used.UsedElem[UsedElemIdx].Id;\r
-      ASSERT (DescIdx < 2 * Dev->TxMaxPending - 1);\r
+      ASSERT (DescIdx < (UINT32) (2 * Dev->TxMaxPending - 1));\r
 \r
       //\r
       // report buffer address to caller that has been enqueued by caller\r
       //\r
-      *TxBuf = (VOID *) Dev->TxRing.Desc[DescIdx + 1].Addr;\r
+      *TxBuf = (VOID *)(UINTN) Dev->TxRing.Desc[DescIdx + 1].Addr;\r
 \r
       //\r
       // now this descriptor can be used again to enqueue a transmit buffer\r
index dcff6a09fc785b55cc87f4ea01100ff952e2a48f..8b3faa38b6b544255cd4b9ea561212c7ef041976 100644 (file)
@@ -3,7 +3,7 @@
   Implementation of the SNP.Receive() function and its private helpers if any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, 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
@@ -142,7 +142,7 @@ VirtioNetReceive (
     *HeaderSize = Dev->Snm.MediaHeaderSize;\r
   }\r
 \r
-  RxPtr = (UINT8 *)Dev->RxRing.Desc[DescIdx + 1].Addr;\r
+  RxPtr = (UINT8 *)(UINTN) Dev->RxRing.Desc[DescIdx + 1].Addr;\r
   CopyMem (Buffer, RxPtr, RxLen);\r
 \r
   if (DestAddr != NULL) {\r
index 5bfb807edc7dc152239c96a324869fd182ac512a..ff922ca021646200ee5acc6c71608865280a79ee 100644 (file)
@@ -3,7 +3,7 @@
   Implementation of the SNP.Transmit() function and its private helpers if any.\r
 \r
   Copyright (C) 2013, Red Hat, Inc.\r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, 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
@@ -140,7 +140,7 @@ VirtioNetTransmit (
     *Ptr++ = (UINT8) (*Protocol >> 8);\r
     *Ptr++ = (UINT8) *Protocol;\r
 \r
-    ASSERT (Ptr - (UINT8 *) Buffer == Dev->Snm.MediaHeaderSize);\r
+    ASSERT ((UINTN) (Ptr - (UINT8 *) Buffer) == Dev->Snm.MediaHeaderSize);\r
   }\r
 \r
   //\r