diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2013-06-14 07:41:05 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-06-14 07:41:05 +0000 |
commit | 8258c4e643132cbdff8b6343a6502d501d86a19a (patch) | |
tree | b56dd905051e14dbafa169e98fba008989eb41c9 /OvmfPkg/VirtioNetDxe | |
parent | 9f3acbb5c9e10f1bdbf5c4b26c0f7d3739d94543 (diff) | |
download | edk2-8258c4e643132cbdff8b6343a6502d501d86a19a.tar.gz edk2-8258c4e643132cbdff8b6343a6502d501d86a19a.tar.bz2 edk2-8258c4e643132cbdff8b6343a6502d501d86a19a.zip |
OvmfPkg/VirtioNetDxe: Fix build errors on VS2012 (IA32 & X64)
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
Diffstat (limited to 'OvmfPkg/VirtioNetDxe')
-rw-r--r-- | OvmfPkg/VirtioNetDxe/SnpGetStatus.c | 6 | ||||
-rw-r--r-- | OvmfPkg/VirtioNetDxe/SnpReceive.c | 4 | ||||
-rw-r--r-- | OvmfPkg/VirtioNetDxe/SnpTransmit.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c index ce6a7295fe..eabcf93c4b 100644 --- a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c +++ b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c @@ -4,7 +4,7 @@ any.
Copyright (C) 2013, Red Hat, Inc.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, 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
@@ -136,12 +136,12 @@ VirtioNetGetStatus ( UsedElemIdx = Dev->TxLastUsed++ % Dev->TxRing.QueueSize;
DescIdx = Dev->TxRing.Used.UsedElem[UsedElemIdx].Id;
- ASSERT (DescIdx < 2 * Dev->TxMaxPending - 1);
+ ASSERT (DescIdx < (UINT32) (2 * Dev->TxMaxPending - 1));
//
// report buffer address to caller that has been enqueued by caller
//
- *TxBuf = (VOID *) Dev->TxRing.Desc[DescIdx + 1].Addr;
+ *TxBuf = (VOID *)(UINTN) Dev->TxRing.Desc[DescIdx + 1].Addr;
//
// now this descriptor can be used again to enqueue a transmit buffer
diff --git a/OvmfPkg/VirtioNetDxe/SnpReceive.c b/OvmfPkg/VirtioNetDxe/SnpReceive.c index dcff6a09fc..8b3faa38b6 100644 --- a/OvmfPkg/VirtioNetDxe/SnpReceive.c +++ b/OvmfPkg/VirtioNetDxe/SnpReceive.c @@ -3,7 +3,7 @@ Implementation of the SNP.Receive() function and its private helpers if any.
Copyright (C) 2013, Red Hat, Inc.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, 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
@@ -142,7 +142,7 @@ VirtioNetReceive ( *HeaderSize = Dev->Snm.MediaHeaderSize;
}
- RxPtr = (UINT8 *)Dev->RxRing.Desc[DescIdx + 1].Addr;
+ RxPtr = (UINT8 *)(UINTN) Dev->RxRing.Desc[DescIdx + 1].Addr;
CopyMem (Buffer, RxPtr, RxLen);
if (DestAddr != NULL) {
diff --git a/OvmfPkg/VirtioNetDxe/SnpTransmit.c b/OvmfPkg/VirtioNetDxe/SnpTransmit.c index 5bfb807edc..ff922ca021 100644 --- a/OvmfPkg/VirtioNetDxe/SnpTransmit.c +++ b/OvmfPkg/VirtioNetDxe/SnpTransmit.c @@ -3,7 +3,7 @@ Implementation of the SNP.Transmit() function and its private helpers if any.
Copyright (C) 2013, Red Hat, Inc.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, 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
@@ -140,7 +140,7 @@ VirtioNetTransmit ( *Ptr++ = (UINT8) (*Protocol >> 8);
*Ptr++ = (UINT8) *Protocol;
- ASSERT (Ptr - (UINT8 *) Buffer == Dev->Snm.MediaHeaderSize);
+ ASSERT ((UINTN) (Ptr - (UINT8 *) Buffer) == Dev->Snm.MediaHeaderSize);
}
//
|