Skip to contentSkip to conversation

sn2: fix warning in prominfo_proc.c

PATCH New Jesse Barnes 1 participant 1 message Sep 10, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sn2: fix warning in prominfo_proc.c

The compiler has no way of knowing whether nentries will be greater than 0, so it was generating a warning that qw might be used uninitialized. Fix it by explicitly setting it to 0. Cc'ing Brian in case he has an internal version he'd like to keep in sync.

Thanks,
Jesse

===== arch/ia64/sn/kernel/sn2/prominfo_proc.c 1.5 vs edited =====

arch/ia64/sn/kernel/sn2/prominfo_proc.c +1 -1
@@ -222,7 +222,7 @@
 {
 	int nentries;
 	int fentry;
-	unsigned long qw;
+	unsigned long qw = 0;
 	int len;
 	nasid_t nasid = NASID_GET(fit);