Unused inits (harmless).

Found by Brainy.
This commit is contained in:
maxv 2015-07-24 13:02:52 +00:00
parent 7ad874c499
commit 6647020bbc
13 changed files with 41 additions and 42 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_time_50.c,v 1.28 2014/11/09 17:48:07 maxv Exp $ */
/* $NetBSD: kern_time_50.c,v 1.29 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.28 2014/11/09 17:48:07 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.29 2015/07/24 13:02:52 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_aio.h"
@ -123,7 +123,7 @@ compat_50_sys_clock_getres(struct lwp *l,
} */
struct timespec50 ats50;
struct timespec ats;
int error = 0;
int error;
error = clock_getres1(SCARG(uap, clock_id), &ats);
if (error != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls_20.c,v 1.38 2014/09/05 09:21:54 matt Exp $ */
/* $NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $ */
/*
* Copyright (c) 1989, 1993
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.38 2014/09/05 09:21:54 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -90,7 +90,7 @@ static int
vfs2fs(struct statfs12 *bfs, const struct statvfs *fs)
{
struct statfs12 ofs;
int i = 0;
int i;
ofs.f_type = 0;
ofs.f_oflags = (short)fs->f_flag;
@ -139,7 +139,7 @@ compat_20_sys_statfs(struct lwp *l, const struct compat_20_sys_statfs_args *uap,
} */
struct mount *mp;
struct statvfs *sbuf;
int error = 0;
int error;
struct vnode *vp;
error = namei_simple_user(SCARG(uap, path),

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_socket.c,v 1.125 2015/05/24 17:07:26 rtr Exp $ */
/* $NetBSD: linux_socket.c,v 1.126 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.125 2015/05/24 17:07:26 rtr Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.126 2015/07/24 13:02:52 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@ -1115,7 +1115,7 @@ linux_getifconf(struct lwp *l, register_t *retval, void *data)
struct ifaddr *ifa;
struct sockaddr *sa;
struct osockaddr *osa;
int space = 0, error = 0;
int space = 0, error;
const int sz = (int)sizeof(ifr);
bool docopy;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux32_socket.c,v 1.19 2014/11/26 09:53:53 ozaki-r Exp $ */
/* $NetBSD: linux32_socket.c,v 1.20 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.19 2014/11/26 09:53:53 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.20 2015/07/24 13:02:52 maxv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -416,7 +416,7 @@ linux32_getifconf(struct lwp *l, register_t *retval, void *data)
struct ifaddr *ifa;
struct sockaddr *sa;
struct osockaddr *osa;
int space = 0, error = 0;
int space = 0, error;
const int sz = (int)sizeof(ifr);
bool docopy;

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_compat_50.c,v 1.29 2015/06/21 08:47:15 martin Exp $ */
/* $NetBSD: netbsd32_compat_50.c,v 1.30 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.29 2015/06/21 08:47:15 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.30 2015/07/24 13:02:52 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@ -352,7 +352,7 @@ compat_50_netbsd32_clock_getres(struct lwp *l,
} */
struct netbsd32_timespec50 ts32;
struct timespec ts;
int error = 0;
int error;
error = clock_getres1(SCARG(uap, clock_id), &ts);
if (error != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ultrix_fs.c,v 1.54 2013/11/27 17:24:44 christos Exp $ */
/* $NetBSD: ultrix_fs.c,v 1.55 2015/07/24 13:02:52 maxv Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.54 2013/11/27 17:24:44 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.55 2015/07/24 13:02:52 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -214,7 +214,7 @@ ultrix_sys_getmnt(struct lwp *l, const struct ultrix_sys_getmnt_args *uap, regis
int skip;
int start;
long count, maxcount;
int error = 0;
int error;
nmp = NULL; /* XXX keep gcc quiet */
path = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $ */
/* $NetBSD: kern_ntptime.c,v 1.56 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -60,7 +60,7 @@
#include <sys/cdefs.h>
/* __FBSDID("$FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $"); */
__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.56 2015/07/24 13:02:52 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@ -260,7 +260,7 @@ sys_ntp_adjtime(struct lwp *l, const struct sys_ntp_adjtime_args *uap, register_
syscallarg(struct timex *) tp;
} */
struct timex ntv;
int error = 0;
int error;
error = copyin((void *)SCARG(uap, tp), (void *)&ntv, sizeof(ntv));
if (error != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_time.c,v 1.179 2013/05/22 16:00:52 christos Exp $ */
/* $NetBSD: kern_time.c,v 1.180 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179 2013/05/22 16:00:52 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.180 2015/07/24 13:02:52 maxv Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@ -238,7 +238,7 @@ sys___clock_getres50(struct lwp *l, const struct sys___clock_getres50_args *uap,
syscallarg(struct timespec *) tp;
} */
struct timespec ts;
int error = 0;
int error;
if ((error = clock_getres1(SCARG(uap, clock_id), &ts)) != 0)
return error;
@ -454,7 +454,7 @@ sys___adjtime50(struct lwp *l, const struct sys___adjtime50_args *uap,
syscallarg(const struct timeval *) delta;
syscallarg(struct timeval *) olddelta;
} */
int error = 0;
int error;
struct timeval atv, oldatv;
if ((error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_TIME,

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_veriexec.c,v 1.8 2015/04/27 20:21:19 riastradh Exp $ */
/* $NetBSD: kern_veriexec.c,v 1.9 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org>
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.8 2015/04/27 20:21:19 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.9 2015/07/24 13:02:52 maxv Exp $");
#include "opt_veriexec.h"
@ -555,7 +555,7 @@ veriexec_fp_status(struct lwp *l, struct vnode *vp, int file_lock_state,
{
size_t hash_len = vfe->ops->hash_len;
u_char *digest;
int error = 0;
int error;
digest = kmem_zalloc(hash_len, KM_SLEEP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_lwp.c,v 1.56 2013/03/29 01:08:17 christos Exp $ */
/* $NetBSD: sys_lwp.c,v 1.57 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.56 2013/03/29 01:08:17 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.57 2015/07/24 13:02:52 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,7 @@ sys__lwp_create(struct lwp *l, const struct sys__lwp_create_args *uap,
syscallarg(lwpid_t *) new_lwp;
} */
struct proc *p = l->l_proc;
ucontext_t *newuc = NULL;
ucontext_t *newuc;
lwpid_t lid;
int error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls.c,v 1.499 2015/06/12 19:06:32 dholland Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.500 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.499 2015/06/12 19:06:32 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.500 2015/07/24 13:02:52 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@ -1950,7 +1950,7 @@ dofhopen(struct lwp *l, const void *ufhp, size_t fhsize, int oflags,
struct vnode *vp = NULL;
kauth_cred_t cred = l->l_cred;
file_t *nfp;
int indx, error = 0;
int indx, error;
struct vattr va;
fhandle_t *fh;
int flags;

View File

@ -1,4 +1,4 @@
/* $NetBSD: procfs_linux.c,v 1.70 2014/08/10 06:22:06 matt Exp $ */
/* $NetBSD: procfs_linux.c,v 1.71 2015/07/24 13:02:52 maxv Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.70 2014/08/10 06:22:06 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.71 2015/07/24 13:02:52 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -371,7 +371,6 @@ procfs_do_pid_statm(struct lwp *curl, struct lwp *l,
int error;
int len;
error = ENAMETOOLONG;
bf = malloc(LBFSZ, M_TEMP, M_WAITOK);
/* XXX - we use values from vmspace, since dsl says that ru figures
@ -419,7 +418,7 @@ procfs_do_pid_stat(struct lwp *curl, struct lwp *l,
struct timeval rt;
struct vmspace *vm;
struct kinfo_proc2 ki;
int error = 0;
int error;
bf = malloc(LBFSZ, M_TEMP, M_WAITOK);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.334 2015/05/23 16:59:13 maxv Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.335 2015/07/24 13:02:52 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.334 2015/05/23 16:59:13 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.335 2015/07/24 13:02:52 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -2269,7 +2269,7 @@ ffs_sbupdate(struct ufsmount *mp, int waitfor)
{
struct fs *fs = mp->um_fs;
struct buf *bp;
int error = 0;
int error;
u_int32_t saveflag;
error = ffs_getblk(mp->um_devvp,