Subject: port-arm/23293: uninitialized variable break the build for evbarm
To: None <gnats-bugs@gnats.netbsd.org>
From: Shoichi Miyake <smi@sm.sony.co.jp>
List: netbsd-bugs
Date: 10/28/2003 14:31:46
>Number: 23293
>Category: port-arm
>Synopsis: uninitialized variable break the build for ixp425
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 28 05:32:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Shoichi Miyake
>Release: NetBSD 1.6ZD
>Organization:
Sony Corporation
>Environment:
System: NetBSD skysensor 1.6ZC NetBSD 1.6ZC (GENERIC) #7: Tue Sep 30 21:10:18 JST 2003 smi@nbx1:/work/nb/arch/i386/obj/sys/arch/i386/compile/GENERIC i386
Architecture: armeb
Machine: evbarm
>Description:
By the change of gcc version to 3.3.1, zao425 build breaks in
- arch/arm/arm32/pmap.c
- arch/evbarm/ixdp425/ixdp425_machdep.c
- arch/arm/xscale/becc_pci.c
>How-To-Repeat:
do build.sh release, and
do build.sh kernel=ZAO425
>Fix:
I made modifications like this just adding initializers, or removing
unused variables, it might be not correct, however.
Index: sys/arch/evbarm/ixdp425/ixdp425_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c,v
retrieving revision 1.9
diff -u -r1.9 ixdp425_machdep.c
--- sys/arch/evbarm/ixdp425/ixdp425_machdep.c 2003/10/23 10:50:01 1.9
+++ sys/arch/evbarm/ixdp425/ixdp425_machdep.c 2003/10/28 05:06:12
@@ -404,7 +404,7 @@
#endif
int loop;
int loop1;
- u_int kerneldatasize, symbolsize;
+ u_int kerneldatasize;
u_int l1pagetable;
u_int freemempos;
pv_addr_t kernel_l1pt;
@@ -445,7 +445,6 @@
#ifdef VERBOSE_INIT_ARM
printf("kernsize=0x%x\n", kerneldatasize);
#endif
- kerneldatasize += symbolsize;
kerneldatasize = ((kerneldatasize - 1) & ~(PAGE_SIZE * 4 - 1)) + PAGE_SIZE * 8;
/*
Index: sys/arch/arm/arm32/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.142
diff -u -r1.142 pmap.c
--- sys/arch/arm/arm32/pmap.c 2003/10/26 23:11:15 1.142
+++ sys/arch/arm/arm32/pmap.c 2003/10/28 03:39:04
@@ -4850,7 +4850,11 @@
pd_entry_t *pde = (pd_entry_t *) l1pt;
pt_entry_t *pte;
vsize_t size;
+#if 1
+ uint32_t auxctl = 0;
+#else
uint32_t auxctl;
+#endif
xscale_minidata_clean_addr = va;
Index: sys/arch/arm/xscale/becc_pci.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/xscale/becc_pci.c,v
retrieving revision 1.4
diff -u -r1.4 becc_pci.c
--- sys/arch/arm/xscale/becc_pci.c 2003/07/15 00:24:52 1.4
+++ sys/arch/arm/xscale/becc_pci.c 2003/10/28 04:33:50
@@ -308,7 +308,7 @@
struct becc_softc *sc = v;
struct pciconf_state ps;
vaddr_t va;
- u_int s;
+ u_int s = 0;
if (becc_pci_conf_setup(sc, tag, offset, &ps))
return;
@@ -328,7 +328,7 @@
int
becc_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
{
- int irq;
+ int irq = 0;
if (pa->pa_bus == 0) {
switch (pa->pa_device) {
>Release-Note:
>Audit-Trail:
>Unformatted: