fix uninitialized variable

This commit is contained in:
christos 2003-10-25 09:06:51 +00:00
parent 9ff8e797c6
commit cb02efca51
3 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sig.c,v 1.169 2003/10/15 11:28:59 hannken Exp $ */ /* $NetBSD: kern_sig.c,v 1.170 2003/10/25 09:06:51 christos Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1989, 1991, 1993 * Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.169 2003/10/15 11:28:59 hannken Exp $"); __KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.170 2003/10/25 09:06:51 christos Exp $");
#include "opt_ktrace.h" #include "opt_ktrace.h"
#include "opt_compat_sunos.h" #include "opt_compat_sunos.h"
@ -996,7 +996,7 @@ kpsignal1(struct proc *p, ksiginfo_t *ksi, void *data, int dolock)
static void static void
kpsignal2(struct proc *p, const ksiginfo_t *ksi, int dolock) kpsignal2(struct proc *p, const ksiginfo_t *ksi, int dolock)
{ {
struct lwp *l, *suspended; struct lwp *l, *suspended = NULL;
int s = 0, prop, allsusp; int s = 0, prop, allsusp;
sig_t action; sig_t action;
int signum = ksi->ksi_signo; int signum = ksi->ksi_signo;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_pipe.c,v 1.44 2003/09/22 12:59:57 christos Exp $ */ /* $NetBSD: sys_pipe.c,v 1.45 2003/10/25 09:10:35 christos Exp $ */
/*- /*-
* Copyright (c) 2003 The NetBSD Foundation, Inc. * Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.44 2003/09/22 12:59:57 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.45 2003/10/25 09:10:35 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -403,6 +403,7 @@ pipeselwakeup(selp, sigp, data, code)
void *data; void *data;
int code; int code;
{ {
/*###406 [cc] warning: `band' might be used uninitialized in this function%%%*/
int band; int band;
selnotify(&selp->pipe_sel, 0); selnotify(&selp->pipe_sel, 0);
@ -426,6 +427,7 @@ pipeselwakeup(selp, sigp, data, code)
break; break;
#endif #endif
default: default:
band = 0;
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
printf("bad siginfo code %d in pipe notification.\n", code); printf("bad siginfo code %d in pipe notification.\n", code);
#endif #endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_lockf.c,v 1.33 2003/08/07 16:32:02 agc Exp $ */ /* $NetBSD: vfs_lockf.c,v 1.34 2003/10/25 09:13:41 christos Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1989, 1993 * Copyright (c) 1982, 1986, 1989, 1993
@ -35,7 +35,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.33 2003/08/07 16:32:02 agc Exp $"); __KERNEL_RCSID(0, "$NetBSD: vfs_lockf.c,v 1.34 2003/10/25 09:13:41 christos Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -104,7 +104,7 @@ lf_advlock(struct vop_advlock_args *ap, struct lockf **head, off_t size)
struct lockf *sparelock; struct lockf *sparelock;
struct simplelock *interlock = &ap->a_vp->v_interlock; struct simplelock *interlock = &ap->a_vp->v_interlock;
off_t start, end; off_t start, end;
int error; int error = 0;
/* /*
* Convert the flock structure into a start and end. * Convert the flock structure into a start and end.