]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/XenBusDxe: Fix build issue with VS2010
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 1 Apr 2015 08:23:11 +0000 (08:23 +0000)
committerjljusten <jljusten@Edk2>
Wed, 1 Apr 2015 08:23:11 +0000 (08:23 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17091 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/XenBusDxe/TestAndClearBit.c

index 410677ee8acda598a8e0af47d6733c964f56c350..ac01b3ce50d4ceedaab96da82d40bfce602e648a 100644 (file)
@@ -2,6 +2,7 @@
   Implementation of TestAndClearBit using compare-exchange primitive\r
 \r
   Copyright (C) 2015, Linaro Ltd.\r
+  Copyright (c) 2015, 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
@@ -32,7 +33,7 @@ TestAndClearBit (
   // ensure we round towards -Inf, and end up with a positive shift in\r
   // 'Bit', even if 'Bit' itself is negative.\r
   //\r
-  Address += (Bit >> 4) * sizeof(UINT16);\r
+  Address = (VOID*)((UINT8*) Address + ((Bit >> 4) * sizeof(UINT16)));\r
   Mask = 1U << (Bit & 15);\r
 \r
   for (Word = *(UINT16 *) Address; Word & Mask; Word = Read) {\r