From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 27 of 45] gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c Date: Fri, 20 May 2011 08:52:58 +0100 Message-ID: <4DD639FA0200007800042612@vpn.id2.novell.com> References: <90160f32dbae6535e54e.1305831946@probook.site> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <90160f32dbae6535e54e.1305831946@probook.site> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 19.05.11 at 21:05, Olaf Hering wrote: > # HG changeset patch > # User Olaf Hering > # Date 1305824412 -7200 > # Node ID 90160f32dbae6535e54e72375b004c0113ed1f62 > # Parent c8f5b4743f9a91dc1e879d35f8f2d4b981f0963d > gcc-4.6 compile fix: xen/arch/x86/acpi/cpu_idle.c >=20 > cpu_idle.c: In function 'acpi_idle_do_entry': > cpu_idle.c:276:9: error: variable 'unused' set but not used=20 > [-Werror=3Dunused-but-set-variable] >=20 > Signed-off-by: Olaf Hering >=20 > 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 > =20 > 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 > =20 > switch ( cx->entry_method ) > { >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com=20 > http://lists.xensource.com/xen-devel=20