x86: Work around compilation warning in arch/x86/kernel/apm_32.c
authorSubrata Modak <[email protected]>
Tue, 21 Jul 2009 02:32:27 +0000 (08:02 +0530)
committerIngo Molnar <[email protected]>
Tue, 4 Aug 2009 14:34:23 +0000 (16:34 +0200)
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

Signed-off-by: Subrata Modak<[email protected]>
Cc: Sachin P Sant <[email protected]>
Cc: David Howells <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Stephen Rothwell <[email protected]>
LKML-Reference: <20090721023226[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/apm_32.c

index 79302e9a33a43322eea70cc2f69f019426b69847..442b5508893f35b185d0cbd8056d03f8b8aa70c0 100644 (file)
@@ -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) {