fix uninitialized variable
This commit is contained in:
parent
a554bf6c09
commit
fe659fa011
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_sym.c,v 1.43 2003/10/05 11:17:47 scw Exp $ */
|
||||
/* $NetBSD: db_sym.c,v 1.44 2003/10/25 08:54:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.43 2003/10/05 11:17:47 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.44 2003/10/25 08:54:01 christos Exp $");
|
||||
|
||||
#include "opt_ddbparam.h"
|
||||
|
||||
@ -204,6 +204,7 @@ db_sifting(char *symstr, int mode)
|
||||
db_sym_t
|
||||
db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp)
|
||||
{
|
||||
/*###207 [cc] warning: `diff' might be used uninitialized in this function%%%*/
|
||||
unsigned int diff;
|
||||
unsigned long naddr;
|
||||
db_sym_t ret = DB_SYM_NULL;
|
||||
@ -231,7 +232,8 @@ db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp)
|
||||
(void)ksyms_getval(mod, sym, &naddr, KSYMS_ANY);
|
||||
diff = val - (db_addr_t)naddr;
|
||||
ret = (db_sym_t)naddr;
|
||||
}
|
||||
} else
|
||||
diff = 0;
|
||||
*offp = diff;
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_vnops.c,v 1.181 2003/09/26 14:08:45 yamt Exp $ */
|
||||
/* $NetBSD: nfs_vnops.c,v 1.182 2003/10/25 08:48:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.181 2003/09/26 14:08:45 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.182 2003/10/25 08:48:11 christos Exp $");
|
||||
|
||||
#include "opt_nfs.h"
|
||||
#include "opt_uvmhist.h"
|
||||
@ -1259,7 +1259,7 @@ nfs_writerpc(vp, uiop, iomode, pageprotected, stalewriteverfp)
|
||||
struct nfsnode *np = VTONFS(vp);
|
||||
struct nfs_writerpc_context ctx;
|
||||
int s;
|
||||
struct lwp *l;
|
||||
struct lwp *l = NULL;
|
||||
size_t origresid;
|
||||
|
||||
simple_lock_init(&ctx.nwc_slock);
|
||||
|
Loading…
Reference in New Issue
Block a user