Fix compilation warning for arch/x86/kernel/apm_32.c
Subsystems (2)
PATCH RESEND 5/6 Fix compilation warning for arch/x86/kernel/apm_32.c
The following fix was initially inspired by David Howells fix few days back:
http://lkml.org/lkml/2009/7/9/109,
However, Ingo disapproves such fixes as it's dangerous - in something as performance-uncritical. So, initialize 'err' to '0' to work around a GCC false positive warning:
http://lkml.org/lkml/2009/7/18/89,
---
arch/x86/kernel/apm_32.c +1 -1
@@ -811,7 +811,7 @@ static int apm_do_idle(void)u8 ret =0 ;int idled =0 ;int polling; -int err; +int err =0 ; polling = !!(current_thread_info ()->status &TS_POLLING );if (polling) {
---
Regards--
Subrata
[tip:x86/urgent] x86: Work around compilation warning in arch/x86/kernel/apm_32.c
Commit-ID: dc731fbbadf5d65c98fcd6c86472aa286c16458a Gitweb: http://git.kernel.org/tip/dc731fbbadf5d65c98fcd6c86472aa286c16458a Author: Subrata Modak <[email protected]> AuthorDate: Tue, 21 Jul 2009 08:02:27 +0530 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 4 Aug 2009 16:34:23 +0200
x86: Work around compilation warning in arch/x86/kernel/apm_32.c
The following fix was initially inspired by David Howells fix few days back:
http://lkml.org/lkml/2009/7/9/109
However, Ingo disapproves such fixes as it's dangerous (it can hide future, relevant warnings) - in something as performance-uncritical.
So, initialize 'err' to '0' to work around a GCC false positive warning:
http://lkml.org/lkml/2009/7/18/89
LKML-Reference: <20090721023226.31855.67236.sendpatchset@subratamodak.linux.ibm.com>
--- arch/x86/kernel/apm_32.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/apm_32.c +1 -1
@@ -811,7 +811,7 @@ static int apm_do_idle(void)u8 ret =0 ;int idled =0 ;int polling; -int err; +int err =0 ; polling = !!(current_thread_info ()->status &TS_POLLING );if (polling) {