Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys fix uninitialized variable
details: https://anonhg.NetBSD.org/src/rev/cf242218b75b
branches: trunk
changeset: 554085:cf242218b75b
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 25 08:48:11 2003 +0000
description:
fix uninitialized variable
diffstat:
sys/ddb/db_sym.c | 8 +++++---
sys/nfs/nfs_vnops.c | 6 +++---
2 files changed, 8 insertions(+), 6 deletions(-)
diffs (63 lines):
diff -r fa8b4d1c0167 -r cf242218b75b sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c Sat Oct 25 08:47:14 2003 +0000
+++ b/sys/ddb/db_sym.c Sat Oct 25 08:48:11 2003 +0000
@@ -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_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 @@
(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;
}
diff -r fa8b4d1c0167 -r cf242218b75b sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Sat Oct 25 08:47:14 2003 +0000
+++ b/sys/nfs/nfs_vnops.c Sat Oct 25 08:48:11 2003 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index