[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 45 of 45] gcc-4.6 compile fix: xen/arch/x86/domain_build.c


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 19 May 2011 21:06:04 +0200
  • Delivery-date: Thu, 19 May 2011 12:48:23 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1305824435 -7200
# Node ID aa545d1b4f1c4b664d6ac49dd158acc68d9588ab
# Parent  9c4ff80169706c948442799f82c15cc65ad403c8
gcc-4.6 compile fix: xen/arch/x86/domain_build.c

domain_build.c: In function 'construct_dom0':
domain_build.c:305:33: error: variable 'compat32' set but not used 
[-Werror=unused-but-set-variable]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 9c4ff8016970 -r aa545d1b4f1c xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Thu May 19 19:00:33 2011 +0200
+++ b/xen/arch/x86/domain_build.c       Thu May 19 19:00:35 2011 +0200
@@ -302,7 +302,10 @@ int __init construct_dom0(
     void *(*bootstrap_map)(const module_t *),
     char *cmdline)
 {
-    int i, cpu, rc, compatible, compat32, order, machine;
+    int i, cpu, rc, compatible, order, machine;
+#if defined(__x86_64__)
+    int compat32 = 0;
+#endif
     struct cpu_user_regs *regs;
     unsigned long pfn, mfn;
     unsigned long nr_pages;
@@ -377,7 +380,6 @@ int __init construct_dom0(
 
     /* compatibility check */
     compatible = 0;
-    compat32   = 0;
     machine = elf_uval(&elf, elf.ehdr, e_machine);
     switch (CONFIG_PAGING_LEVELS) {
     case 3: /* x86_32p */
@@ -393,7 +395,9 @@ int __init construct_dom0(
             parms.pae = PAEKERN_extended_cr3;
         if (elf_32bit(&elf) && parms.pae && machine == EM_386)
         {
+#if defined(__x86_64__)
             compat32 = 1;
+#endif
             compatible = 1;
         }
         if (elf_64bit(&elf) && machine == EM_X86_64)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.