Subject: kern/13465: Uninitializated variable used in dev/isa/if_ix.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cato@df.lth.se>
List: netbsd-bugs
Date: 07/14/2001 19:50:24
>Number: 13465
>Category: kern
>Synopsis: Uninitializated variable used in dev/isa/if_ix.c
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 14 10:48:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Krister Walfridsson
>Release: Sources as of 2001-07-13
>Organization:
>Environment:
System: NetBSD ulysses 1.4.3 NetBSD 1.4.3 (GENERIC1) #0: Sat Dec 30 14:23:09 CET 2000 cato@ulysses:/dsk2/tmp/nbsd143.i386/src/sys/arch/i386/compile/GENERIC1 i386
>Description:
The variable 'wpat' may be used on line 815 (if_ix.c,v 1.9) before it is
initialized.
>How-To-Repeat:
>Fix:
diff -u -r1.9 if_ix.c
--- src/sys/dev/isa/if_ix.c 2001/03/10 20:04:30 1.9
+++ src/sys/dev/isa/if_ix.c 2001/07/14 17:46:02
@@ -811,7 +811,7 @@
BUS_SPACE_BARRIER_WRITE);
/* write test pattern */
- for(i = 0; i < memsize; i += 2) {
+ for(i = 0, wpat = 1; i < memsize; i += 2) {
bus_space_write_2(iot, ioh, IX_DATAPORT, wpat);
wpat += 3;
}
>Release-Note:
>Audit-Trail:
>Unformatted: