]> git.hungrycats.org Git - linux/commitdiff
[PATCH] parisc /proc/interrupts uninitialised var
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:49:53 +0000 (23:49 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:49:53 +0000 (23:49 -0800)
From: James Bottomley <James.Bottomley@SteelEye.com>

The compiler justly complains in this:

        unsigned int regnr = *(loff_t *) v, i;

        if (regnr == 0) {
                seq_puts(p, "     ");
#ifdef CONFIG_SMP
                for (i = 0; i < NR_CPUS; i++)
#endif
                        seq_printf(p, "      CPU%02d ", i);

That i is uninitialised if CONFIG_SMP is not set.

arch/parisc/kernel/irq.c

index e345262d3ea221981bc3bbd04a33d2a3383fc81c..72f748905f1898a1715354ea133cbaa72a0ba85b 100644 (file)
@@ -215,7 +215,7 @@ EXPORT_SYMBOL(enable_irq);
 int show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_PROC_FS
-       unsigned int regnr = *(loff_t *) v, i;
+       unsigned int regnr = *(loff_t *) v, i = 0;
 
        if (regnr == 0) {
                seq_puts(p, "     ");