appease gcc -Wuninitialized

This commit is contained in:
lukem 2005-06-02 05:58:24 +00:00
parent 9b668c37e7
commit c8e07a4ef7
5 changed files with 22 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs.c,v 1.33 2004/12/20 20:51:42 jmc Exp $ */
/* $NetBSD: ffs.c,v 1.34 2005/06/02 05:58:24 lukem Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -71,7 +71,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: ffs.c,v 1.33 2004/12/20 20:51:42 jmc Exp $");
__RCSID("$NetBSD: ffs.c,v 1.34 2005/06/02 05:58:24 lukem Exp $");
#endif /* !__lint */
#include <sys/param.h>
@ -864,6 +864,7 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts)
isfile = S_ISREG(DIP(din, mode));
fbuf = NULL;
ffd = -1;
p = NULL;
in.i_fs = (struct fs *)fsopts->superblock;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmds.c,v 1.7 2003/07/13 12:30:17 itojun Exp $ */
/* $NetBSD: cmds.c,v 1.8 2005/06/02 05:59:32 lukem Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#ifndef lint
#include <sys/cdefs.h>
__RCSID("$NetBSD: cmds.c,v 1.7 2003/07/13 12:30:17 itojun Exp $");
__RCSID("$NetBSD: cmds.c,v 1.8 2005/06/02 05:59:32 lukem Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -195,6 +195,8 @@ cmd_cstatus(char **argv)
const char *model;
int i, channel, target;
model = NULL; /* XXXGCC -Wuninitialized */
for (i = 0; i < sizeof(mlx_ctlr_names) / sizeof(mlx_ctlr_names[0]); i++)
if (ci.ci_hardware_id == mlx_ctlr_names[i].hwid) {
model = mlx_ctlr_names[i].name;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mountd.c,v 1.94 2005/04/27 20:32:41 perseant Exp $ */
/* $NetBSD: mountd.c,v 1.95 2005/06/02 06:01:09 lukem Exp $ */
/*
* Copyright (c) 1989, 1993
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: mountd.c,v 1.94 2005/04/27 20:32:41 perseant Exp $");
__RCSID("$NetBSD: mountd.c,v 1.95 2005/06/02 06:01:09 lukem Exp $");
#endif
#endif /* not lint */
@ -2043,8 +2043,11 @@ do_mount(line, lineno, ep, grp, exflags, anoncrp, dirp, dirplen, fsb)
ai = grp->gr_ptr.gt_addrinfo;
addrp = ai->ai_addr;
addrlen = ai->ai_addrlen;
} else
} else {
addrp = NULL;
ai = NULL; /* XXXGCC -Wuninitialized */
addrlen = 0; /* XXXGCC -Wuninitialized */
}
done = FALSE;
while (!done) {
switch (grp->gr_type) {
@ -2182,6 +2185,9 @@ get_net(cp, net, maskflg)
p = strchr(cp, '/');
*p = '\0';
prefp = p + 1;
} else {
p = NULL; /* XXXGCC -Wuninitialized */
prefp = NULL; /* XXXGCC -Wuninitialized */
}
if ((np = getnetbyname(cp)) != NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: moused.c,v 1.14 2004/10/30 08:54:51 dsl Exp $ */
/* $NetBSD: moused.c,v 1.15 2005/06/02 06:03:53 lukem Exp $ */
/**
** Copyright (c) 1995 Michael Smith, All rights reserved.
**
@ -48,7 +48,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: moused.c,v 1.14 2004/10/30 08:54:51 dsl Exp $");
__RCSID("$NetBSD: moused.c,v 1.15 2005/06/02 06:03:53 lukem Exp $");
#endif /* not lint */
#include <ctype.h>
@ -897,6 +897,7 @@ moused(char *wsm)
zstate[i].count = 0;
zstate[i].tv = mouse_button_state_tv;
}
flags = 0;
/* process mouse data */
for (;;) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: crc.c,v 1.7 2005/02/06 04:52:53 perry Exp $ */
/* $NetBSD: crc.c,v 1.8 2005/06/02 06:04:46 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
#else
__RCSID("$NetBSD: crc.c,v 1.7 2005/02/06 04:52:53 perry Exp $");
__RCSID("$NetBSD: crc.c,v 1.8 2005/06/02 06:04:46 lukem Exp $");
#endif
#endif /* not lint */
@ -128,7 +128,7 @@ crc(int fd, u_int32_t *cval, u_int32_t *clen)
#define COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
thecrc = len = 0;
thecrc = len = crctot = 0;
if (sflag)
crctot = ~crc_total;
while ((nr = read(fd, buf, sizeof(buf))) > 0)