LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppx32: Fix uninitialized variable in set_preferred_console
@ 2005-05-20  6:45 Paul Mackerras
  0 siblings, 0 replies; only message in thread
From: Paul Mackerras @ 2005-05-20  6:45 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linuxppc-dev, trini

This patch fixes an uninitialized variable warning in
arch/ppc/kernel/setup.c, and this time gcc is actually right, there is
a path that could result in offset being uninitialized.  Zero is a
sane default in this instance.

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

diff -urN linux-2.6/arch/ppc/kernel/setup.c pmac-2.5/arch/ppc/kernel/setup.c
--- linux-2.6/arch/ppc/kernel/setup.c	2005-05-18 10:53:54.000000000 +1000
+++ pmac-2.5/arch/ppc/kernel/setup.c	2005-05-18 14:11:33.000000000 +1000
@@ -499,7 +499,7 @@
 {
 	struct device_node *prom_stdout;
 	char *name;
-	int offset;
+	int offset = 0;
 
 	if (of_stdout_device == NULL)
 		return -ENODEV;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-20  6:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20  6:45 [PATCH] ppx32: Fix uninitialized variable in set_preferred_console Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox