]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/SnpGetStatus.c
OvmfPkg/VirtioNetDxe: Fix build errors on VS2012 (IA32 & X64)
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / SnpGetStatus.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