From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 45 of 45] gcc-4.6 compile fix: xen/arch/x86/domain_build.c Date: Thu, 19 May 2011 21:06:04 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Olaf Hering # 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 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)