lkml.org 
[lkml]   [2005]   [Apr]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 2 Apr 2005 14:37:47 +1000
FromPaul Mackerras <>
Subject[PATCH] ppc: eliminate gcc warning in prom.c
This patch shuts up a couple of gcc "variable may be used
uninitialized" warnings.  The warnings are invalid - the code is such
that the variables are in fact initialized before being used - but gcc
isn't smart enough to see that.  This patch eliminates the warnings.

Signed-off-by: Paul Mackerras <paulus@samba.org>

diff -urN linux-2.5/arch/ppc/syslib/prom.c pmac-2.5/arch/ppc/syslib/prom.c
--- linux-2.5/arch/ppc/syslib/prom.c	2005-01-22 09:25:41.000000000 +1100
+++ pmac-2.5/arch/ppc/syslib/prom.c	2005-01-30 18:54:26.000000000 +1100
@@ -308,7 +308,7 @@
 	struct device_node *p, *ipar;
 	unsigned int *imap, *imask, *ip;
 	int i, imaplen, match;
-	int newintrc, newaddrc;
+	int newintrc = 1, newaddrc = 1;
 	unsigned int *reg;
 	int naddrc;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-06 11:31    [W:0.371 / U:0.140 seconds]
©2003-2008 Jasper Spaans