Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Fix uninitialized variable warnings.
details: https://anonhg.NetBSD.org/src/rev/8b3b7e9f9b1b
branches: trunk
changeset: 554136:8b3b7e9f9b1b
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 25 18:26:46 2003 +0000
description:
Fix uninitialized variable warnings.
diffstat:
sys/ufs/lfs/lfs_balloc.c | 6 +++---
sys/ufs/lfs/lfs_segment.c | 6 +++---
sys/ufs/lfs/lfs_vfsops.c | 8 ++++----
sys/ufs/lfs/lfs_vnops.c | 9 +++++----
4 files changed, 15 insertions(+), 14 deletions(-)
diffs (115 lines):
diff -r c05aa3821499 -r 8b3b7e9f9b1b sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c Sat Oct 25 18:26:07 2003 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c Sat Oct 25 18:26:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_balloc.c,v 1.44 2003/09/04 12:28:53 yamt Exp $ */
+/* $NetBSD: lfs_balloc.c,v 1.45 2003/10/25 18:26:46 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.44 2003/09/04 12:28:53 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.45 2003/10/25 18:26:46 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -124,7 +124,7 @@
struct vnode *vp;
int offset;
u_long iosize;
- daddr_t daddr, idaddr;
+ daddr_t daddr, idaddr = 0; /* XXX: gcc */
struct buf *ibp, *bp, **bpp;
struct inode *ip;
struct lfs *fs;
diff -r c05aa3821499 -r 8b3b7e9f9b1b sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sat Oct 25 18:26:07 2003 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sat Oct 25 18:26:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.141 2003/10/18 15:52:42 yamt Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.142 2003/10/25 18:26:46 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.141 2003/10/18 15:52:42 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.142 2003/10/25 18:26:46 christos Exp $");
#define ivndebug(vp,str) printf("ino %d: %s\n",VTOI(vp)->i_number,(str))
@@ -1639,7 +1639,7 @@
struct vop_strategy_args vop_strategy_a;
u_short ninos;
struct vnode *devvp;
- char *p;
+ char *p = NULL;
struct vnode *vp;
int32_t *daddrp; /* XXX ondisk32 */
int changed;
diff -r c05aa3821499 -r 8b3b7e9f9b1b sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Sat Oct 25 18:26:07 2003 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Sat Oct 25 18:26:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.135 2003/10/14 14:02:56 dbj Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.136 2003/10/25 18:26:46 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.135 2003/10/14 14:02:56 dbj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.136 2003/10/25 18:26:46 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -659,9 +659,9 @@
{
struct vnode *devvp;
struct buf *bp, *dbp;
- int error, nblocks, ninos, i, j;
+ int error, nblocks = 0, ninos, i, j; /* XXX: gcc */
SEGSUM *ssp;
- u_long *dp, *datap; /* XXX u_int32_t */
+ u_long *dp = NULL, *datap = NULL; /* XXX u_int32_t */
daddr_t oldoffset;
int32_t *iaddr; /* XXX ondisk32 */
FINFO *fip;
diff -r c05aa3821499 -r 8b3b7e9f9b1b sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Sat Oct 25 18:26:07 2003 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Sat Oct 25 18:26:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.121 2003/10/21 00:39:03 fvdl Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.122 2003/10/25 18:26:46 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.121 2003/10/21 00:39:03 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.122 2003/10/25 18:26:46 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1362,9 +1362,10 @@
int flags, int checkfirst)
{
int by_list;
- struct vm_page *curpg, *pgs[MAXBSIZE / PAGE_SIZE], *pg;
+ struct vm_page *curpg = NULL; /* XXX: gcc */
+ struct vm_page *pgs[MAXBSIZE / PAGE_SIZE], *pg;
struct lwp *l = curlwp ? curlwp : &lwp0;
- off_t soff;
+ off_t soff = 0; /* XXX: gcc */
voff_t off;
int i;
int nonexistent;
Home |
Main Index |
Thread Index |
Old Index