ia64/xen-unstable
changeset 11652:1d0e75523636
[VMXASSIST] Cast to pointer type via long to avoid compile
warnings/errors with latest gcc versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
warnings/errors with latest gcc versions.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Sep 27 17:49:22 2006 +0100 (2006-09-27) |
parents | 5c522692edd1 |
children | e759cc598822 |
files | tools/firmware/vmxassist/vm86.c |
line diff
1.1 --- a/tools/firmware/vmxassist/vm86.c Wed Sep 27 16:22:17 2006 +0100 1.2 +++ b/tools/firmware/vmxassist/vm86.c Wed Sep 27 17:49:22 2006 +0100 1.3 @@ -68,7 +68,7 @@ guest_linear_to_real(uint32_t base) 1.4 return base; 1.5 1.6 if (!(oldctx.cr4 & CR4_PAE)) { 1.7 - l1_mfn = ((uint32_t *)gcr3)[(base >> 22) & 0x3ff]; 1.8 + l1_mfn = ((uint32_t *)(long)gcr3)[(base >> 22) & 0x3ff]; 1.9 if (!(l1_mfn & PT_ENTRY_PRESENT)) 1.10 panic("l2 entry not present\n"); 1.11 1.12 @@ -79,19 +79,19 @@ guest_linear_to_real(uint32_t base) 1.13 1.14 l1_mfn &= 0xfffff000; 1.15 1.16 - l0_mfn = ((uint32_t *)l1_mfn)[(base >> 12) & 0x3ff]; 1.17 + l0_mfn = ((uint32_t *)(long)l1_mfn)[(base >> 12) & 0x3ff]; 1.18 if (!(l0_mfn & PT_ENTRY_PRESENT)) 1.19 panic("l1 entry not present\n"); 1.20 l0_mfn &= 0xfffff000; 1.21 1.22 return l0_mfn + (base & 0xfff); 1.23 } else { 1.24 - l2_mfn = ((uint64_t *)gcr3)[(base >> 30) & 0x3]; 1.25 + l2_mfn = ((uint64_t *)(long)gcr3)[(base >> 30) & 0x3]; 1.26 if (!(l2_mfn & PT_ENTRY_PRESENT)) 1.27 panic("l3 entry not present\n"); 1.28 l2_mfn &= 0x3fffff000ULL; 1.29 1.30 - l1_mfn = ((uint64_t *)l2_mfn)[(base >> 21) & 0x1ff]; 1.31 + l1_mfn = ((uint64_t *)(long)l2_mfn)[(base >> 21) & 0x1ff]; 1.32 if (!(l1_mfn & PT_ENTRY_PRESENT)) 1.33 panic("l2 entry not present\n"); 1.34 1.35 @@ -102,7 +102,7 @@ guest_linear_to_real(uint32_t base) 1.36 1.37 l1_mfn &= 0x3fffff000ULL; 1.38 1.39 - l0_mfn = ((uint64_t *)l1_mfn)[(base >> 12) & 0x1ff]; 1.40 + l0_mfn = ((uint64_t *)(long)l1_mfn)[(base >> 12) & 0x1ff]; 1.41 if (!(l0_mfn & PT_ENTRY_PRESENT)) 1.42 panic("l1 entry not present\n"); 1.43 l0_mfn &= 0x3fffff000ULL;