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-devel

Re: [Xen-devel] [PATCH 27 of 45] gcc-4.6 compile fix: xen/arch/x86/acpi/

To: "Olaf Hering" <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 27 of 45] gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 20 May 2011 08:52:58 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 20 May 2011 00:52:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <90160f32dbae6535e54e.1305831946@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1305831919@xxxxxxxxxxxx> <90160f32dbae6535e54e.1305831946@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 19.05.11 at 21:05, Olaf Hering <olaf@xxxxxxxxx> wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@xxxxxxxxx>
> # Date 1305824412 -7200
> # Node ID 90160f32dbae6535e54e72375b004c0113ed1f62
> # Parent  c8f5b4743f9a91dc1e879d35f8f2d4b981f0963d
> gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c
> 
> cpu_idle.c: In function 'acpi_idle_do_entry':
> cpu_idle.c:276:9: error: variable 'unused' set but not used 
> [-Werror=unused-but-set-variable]
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> 
> diff -r c8f5b4743f9a -r 90160f32dbae xen/arch/x86/acpi/cpu_idle.c
> --- a/xen/arch/x86/acpi/cpu_idle.c    Thu May 19 19:00:11 2011 +0200
> +++ b/xen/arch/x86/acpi/cpu_idle.c    Thu May 19 19:00:12 2011 +0200
> @@ -273,7 +273,7 @@ static void acpi_processor_ffh_cstate_en
>  
>  static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
>  {
> -    int unused;
> +    int unused __attribute__((unused));

Better remove the variable and its assignment - inl(), just as the
inb() immediately before, can't be removed by the compiler even
if its result is unused (they're volatile asm()-s).

Jan

>  
>      switch ( cx->entry_method )
>      {
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx 
> http://lists.xensource.com/xen-devel 




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

<Prev in Thread] Current Thread [Next in Thread>