WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.0.3-testing] [VMXASSIST] Cast to pointer type via

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.3-testing] [VMXASSIST] Cast to pointer type via long to avoid compile
From: "Xen patchbot-3.0.3-testing" <patchbot-3.0.3-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 02 Oct 2006 12:40:14 -0700
Delivery-date: Tue, 03 Oct 2006 01:18:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1159375762 -3600
# Node ID 1d0e7552363622e2d8555709ad978e0c8bafa6d6
# Parent  5c522692edd188b636b1f239f071540e94daf29f
[VMXASSIST] Cast to pointer type via long to avoid compile
warnings/errors with latest gcc versions.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/firmware/vmxassist/vm86.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 5c522692edd1 -r 1d0e75523636 tools/firmware/vmxassist/vm86.c
--- a/tools/firmware/vmxassist/vm86.c   Wed Sep 27 16:22:17 2006 +0100
+++ b/tools/firmware/vmxassist/vm86.c   Wed Sep 27 17:49:22 2006 +0100
@@ -68,7 +68,7 @@ guest_linear_to_real(uint32_t base)
                return base;
 
        if (!(oldctx.cr4 & CR4_PAE)) {
-               l1_mfn = ((uint32_t *)gcr3)[(base >> 22) & 0x3ff];
+               l1_mfn = ((uint32_t *)(long)gcr3)[(base >> 22) & 0x3ff];
                if (!(l1_mfn & PT_ENTRY_PRESENT))
                        panic("l2 entry not present\n");
 
@@ -79,19 +79,19 @@ guest_linear_to_real(uint32_t base)
 
                l1_mfn &= 0xfffff000;
 
-               l0_mfn = ((uint32_t *)l1_mfn)[(base >> 12) & 0x3ff];
+               l0_mfn = ((uint32_t *)(long)l1_mfn)[(base >> 12) & 0x3ff];
                if (!(l0_mfn & PT_ENTRY_PRESENT))
                        panic("l1 entry not present\n");
                l0_mfn &= 0xfffff000;
 
                return l0_mfn + (base & 0xfff);
        } else {
-               l2_mfn = ((uint64_t *)gcr3)[(base >> 30) & 0x3];
+               l2_mfn = ((uint64_t *)(long)gcr3)[(base >> 30) & 0x3];
                if (!(l2_mfn & PT_ENTRY_PRESENT))
                        panic("l3 entry not present\n");
                l2_mfn &= 0x3fffff000ULL;
 
-               l1_mfn = ((uint64_t *)l2_mfn)[(base >> 21) & 0x1ff];
+               l1_mfn = ((uint64_t *)(long)l2_mfn)[(base >> 21) & 0x1ff];
                if (!(l1_mfn & PT_ENTRY_PRESENT))
                        panic("l2 entry not present\n");
 
@@ -102,7 +102,7 @@ guest_linear_to_real(uint32_t base)
 
                l1_mfn &= 0x3fffff000ULL;
 
-               l0_mfn = ((uint64_t *)l1_mfn)[(base >> 12) & 0x1ff];
+               l0_mfn = ((uint64_t *)(long)l1_mfn)[(base >> 12) & 0x1ff];
                if (!(l0_mfn & PT_ENTRY_PRESENT))
                        panic("l1 entry not present\n");
                l0_mfn &= 0x3fffff000ULL;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0.3-testing] [VMXASSIST] Cast to pointer type via long to avoid compile, Xen patchbot-3.0.3-testing <=