Adjust gcc -Wuninitialized warning initializers (or add them) so that
compliation without DEBUG and/or DIAGNOSTIC happens without errors. Note that all such initializations in the Alpha port are marked with "XXX gcc -Wuninitialized". As far as I'm concerned, the one or two times -Wuninitialized has saved me from problems are worth the (very minor) cost involved with the initializations, esp. if it's noted why the initializations are done. This was prompted by PR#3690, from Ted Lemon.
This commit is contained in:
parent
7b9ee5e56e
commit
e4f0b64254
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: apecs_pci.c,v 1.13 1997/04/07 23:40:28 cgd Exp $ */
|
||||
/* $NetBSD: apecs_pci.c,v 1.14 1997/05/31 05:46:03 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -30,7 +30,7 @@
|
||||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.13 1997/04/07 23:40:28 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.14 1997/05/31 05:46:03 cgd Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -118,10 +118,8 @@ apecs_conf_read(cpv, tag, offset)
|
||||
int s, secondary, ba;
|
||||
int32_t old_haxr2; /* XXX */
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
s = 0; /* XXX gcc -Wuninitialized */
|
||||
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
/* secondary if bus # != 0 */
|
||||
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
|
||||
@ -169,10 +167,8 @@ apecs_conf_write(cpv, tag, offset, data)
|
||||
int s, secondary;
|
||||
int32_t old_haxr2; /* XXX */
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
s = 0; /* XXX gcc -Wuninitialized */
|
||||
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
/* secondary if bus # != 0 */
|
||||
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lca_pci.c,v 1.10 1997/04/07 23:40:38 cgd Exp $ */
|
||||
/* $NetBSD: lca_pci.c,v 1.11 1997/05/31 05:46:05 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -30,7 +30,7 @@
|
||||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.10 1997/04/07 23:40:38 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.11 1997/05/31 05:46:05 cgd Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -120,9 +120,7 @@ lca_conf_read(cpv, tag, offset)
|
||||
pcireg_t *datap, data;
|
||||
int s, secondary, device, ba;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
s = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
/* secondary if bus # != 0 */
|
||||
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
|
||||
@ -176,9 +174,7 @@ lca_conf_write(cpv, tag, offset, data)
|
||||
pcireg_t *datap;
|
||||
int s, secondary, device;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
s = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
/* secondary if bus # != 0 */
|
||||
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci_2100_a50.c,v 1.14 1997/04/07 23:40:40 cgd Exp $ */
|
||||
/* $NetBSD: pci_2100_a50.c,v 1.15 1997/05/31 05:46:06 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -30,7 +30,7 @@
|
||||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.14 1997/04/07 23:40:40 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.15 1997/05/31 05:46:06 cgd Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -108,6 +108,10 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
|
||||
pcireg_t pirqreg;
|
||||
u_int8_t pirqline;
|
||||
|
||||
#ifndef DIAGNOSTIC
|
||||
pirq = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
if (buspin == 0) {
|
||||
/* No IRQ used. */
|
||||
return 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci_axppci_33.c,v 1.12 1997/04/07 23:40:41 cgd Exp $ */
|
||||
/* $NetBSD: pci_axppci_33.c,v 1.13 1997/05/31 05:46:07 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -30,7 +30,7 @@
|
||||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.12 1997/04/07 23:40:41 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.13 1997/05/31 05:46:07 cgd Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -109,6 +109,10 @@ dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
|
||||
pcireg_t pirqreg;
|
||||
u_int8_t pirqline;
|
||||
|
||||
#ifndef DIAGNOSTIC
|
||||
pirq = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
if (buspin == 0) {
|
||||
/* No IRQ used. */
|
||||
return 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci_eb164.c,v 1.6 1997/04/07 23:40:42 cgd Exp $ */
|
||||
/* $NetBSD: pci_eb164.c,v 1.7 1997/05/31 05:46:08 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -30,7 +30,7 @@
|
||||
#include <machine/options.h> /* Config options headers */
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.6 1997/04/07 23:40:42 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.7 1997/05/31 05:46:08 cgd Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -131,6 +131,10 @@ dec_eb164_intr_map(ccv, bustag, buspin, line, ihp)
|
||||
int device;
|
||||
int eb164_irq, pinbase, pinoff;
|
||||
|
||||
#ifndef DIAGNOSTIC
|
||||
pinbase = pinoff = 0; /* XXX gcc -Wuninitialized */
|
||||
#endif
|
||||
|
||||
if (buspin == 0) {
|
||||
/* No IRQ used. */
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user