Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Backout wildcard pragma to kill warnings and instead...
details: https://anonhg.NetBSD.org/src/rev/a37170107239
branches: trunk
changeset: 790010:a37170107239
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 14 22:29:08 2013 +0000
description:
Backout wildcard pragma to kill warnings and instead sprinkle a few dozen
__unused attributes.
Requested by joerg@
diffstat:
sys/nfs/nfs_serv.c | 62 ++++++++++++++++++++++++++++++---------------------
sys/nfs/nfs_socket.c | 8 +++++-
sys/nfs/nfs_vnops.c | 6 ++--
sys/nfs/nfsm_subs.h | 10 +-------
4 files changed, 46 insertions(+), 40 deletions(-)
diffs (truncated from 346 to 300 lines):
diff -r 477c4d27ef0a -r a37170107239 sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c Sat Sep 14 22:27:01 2013 +0000
+++ b/sys/nfs/nfs_serv.c Sat Sep 14 22:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.165 2012/08/29 14:00:22 christos Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.166 2013/09/14 22:29:08 martin Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.165 2012/08/29 14:00:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.166 2013/09/14 22:29:08 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -166,7 +166,7 @@
char *bpos;
int error = 0, rdonly, cache = 0, getret;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vattr va;
u_long inmode, testmode, outmode;
u_quad_t frev;
@@ -231,7 +231,7 @@
char *bpos;
int error = 0, rdonly, cache = 0;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
u_quad_t frev;
nfsm_srvmtofh(&nsfh);
@@ -273,7 +273,7 @@
int error = 0, rdonly, cache = 0, preat_ret = 1, postat_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3), gcheck = 0;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
u_quad_t frev;
struct timespec guard;
@@ -402,7 +402,7 @@
uint32_t len;
int v3 = (nfsd->nd_flag & ND_NFSV3), pubflag;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vattr va, dirattr;
u_quad_t frev;
@@ -529,7 +529,7 @@
uint32_t len;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mp2 = NULL, *mp3 = NULL, *mreq;
+ struct mbuf *mb, *mp2 = NULL, *mp3 = NULL, *mreq __unused;
struct vnode *vp;
struct vattr attr;
nfsrvfh_t nsfh;
@@ -852,7 +852,7 @@
int stable = NFSV3WRITE_FILESYNC;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp;
nfsrvfh_t nsfh;
struct uio io, *uiop = &io;
@@ -1420,7 +1420,7 @@
int rdev = 0, abort = 0;
int v3 = (nfsd->nd_flag & ND_NFSV3), how, exclusive_flag = 0;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp = NULL, *dirp = NULL;
nfsrvfh_t nsfh;
u_quad_t frev, tempsize;
@@ -1660,7 +1660,7 @@
u_int32_t major, minor;
enum vtype vtyp;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp, *dirp = (struct vnode *)0;
nfsrvfh_t nsfh;
u_quad_t frev;
@@ -1810,7 +1810,7 @@
int error = 0, cache = 0, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp, *dirp;
struct vattr dirfor, diraft;
nfsrvfh_t nsfh;
@@ -1897,7 +1897,7 @@
int tdirfor_ret = 1, tdiraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct nameidata fromnd, tond;
struct vnode *fvp, *tvp, *tdvp;
struct vnode *fdirp = NULL, *tdirp = NULL;
@@ -2169,7 +2169,7 @@
int error = 0, rdonly, cache = 0, len, dirfor_ret = 1, diraft_ret = 1;
int getret = 1, v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp, *xp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft, at;
nfsrvfh_t nsfh, dnsfh;
@@ -2271,7 +2271,7 @@
int error = 0, cache = 0, dirfor_ret = 1, diraft_ret = 1, abort = 0;
uint32_t len, len2;
int v3 = (nfsd->nd_flag & ND_NFSV3);
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *dirp = (struct vnode *)0;
nfsrvfh_t nsfh;
u_quad_t frev;
@@ -2415,7 +2415,7 @@
int abort = 0;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp, *dirp = (struct vnode *)0;
nfsrvfh_t nsfh;
u_quad_t frev;
@@ -2535,7 +2535,7 @@
int error = 0, cache = 0, len, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp, *dirp = (struct vnode *)0;
struct vattr dirfor, diraft;
nfsrvfh_t nsfh;
@@ -2670,7 +2670,7 @@
u_int32_t *tl;
int32_t t1;
char *bpos;
- struct mbuf *mb, *mreq, *mp2;
+ struct mbuf *mb, *mreq __unused, *mp2;
char *cpos, *cend, *cp2, *rbuf;
struct vnode *vp;
struct vattr at;
@@ -2680,7 +2680,10 @@
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, cache = 0, ncookies;
int v3 = (nfsd->nd_flag & ND_NFSV3);
- u_quad_t frev, off, toff, verf;
+ u_quad_t frev, off, toff;
+#ifdef NFS3_STRICTVERF
+ u_quad_t verf;
+#endif
off_t *cookies = NULL, *cookiep;
nfsuint64 jar;
@@ -2689,7 +2692,9 @@
nfsm_dissect(tl, u_int32_t *, 5 * NFSX_UNSIGNED);
toff = fxdr_hyper(tl);
tl += 2;
+#ifdef NFS3_STRICTVERF
verf = fxdr_hyper(tl);
+#endif
tl += 2;
} else {
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
@@ -2928,7 +2933,7 @@
u_int32_t *tl;
int32_t t1;
char *bpos;
- struct mbuf *mb, *mreq, *mp2;
+ struct mbuf *mb, *mreq __unused, *mp2;
char *cpos, *cend, *cp2, *rbuf;
struct vnode *vp, *nvp;
struct flrep fl;
@@ -2939,14 +2944,19 @@
struct nfs_fattr *fp;
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, cache = 0, dirlen, ncookies;
- u_quad_t frev, off, toff, verf;
+ u_quad_t frev, off, toff;
+#ifdef NFS3_STRICTVERF
+ u_quad_t verf;
+#endif
off_t *cookies = NULL, *cookiep;
nfsm_srvmtofh(&nsfh);
nfsm_dissect(tl, u_int32_t *, 6 * NFSX_UNSIGNED);
toff = fxdr_hyper(tl);
tl += 2;
+#ifdef NFS3_STRICTVERF
verf = fxdr_hyper(tl);
+#endif
tl += 2;
siz = fxdr_unsigned(int, *tl++);
cnt = fxdr_unsigned(int, *tl);
@@ -3254,7 +3264,7 @@
int error = 0, rdonly, for_ret = 1, aft_ret = 1, cache = 0;
uint32_t cnt;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
u_quad_t frev, off, end;
nfsm_srvmtofh(&nsfh);
@@ -3309,7 +3319,7 @@
int error = 0, rdonly, cache = 0, getret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp;
struct vattr at;
nfsrvfh_t nsfh;
@@ -3378,7 +3388,7 @@
int error = 0, rdonly, cache = 0, getret = 1;
uint32_t maxdata;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp;
struct vattr at;
nfsrvfh_t nsfh;
@@ -3448,7 +3458,7 @@
int error = 0, rdonly, cache = 0, getret = 1;
register_t linkmax, namemax, chownres, notrunc;
char *cp2;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
struct vnode *vp;
struct vattr at;
nfsrvfh_t nsfh;
@@ -3503,7 +3513,7 @@
struct mbuf *mrep = nfsd->nd_mrep;
char *bpos;
int error = NFSERR_RETVOID, cache = 0;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
u_quad_t frev;
nfsm_reply(0);
@@ -3522,7 +3532,7 @@
struct mbuf *mrep = nfsd->nd_mrep;
char *bpos;
int error, cache = 0;
- struct mbuf *mb, *mreq;
+ struct mbuf *mb, *mreq __unused;
u_quad_t frev;
if (nfsd->nd_repstat)
diff -r 477c4d27ef0a -r a37170107239 sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Sat Sep 14 22:27:01 2013 +0000
+++ b/sys/nfs/nfs_socket.c Sat Sep 14 22:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_socket.c,v 1.189 2011/03/23 17:42:11 tls Exp $ */
+/* $NetBSD: nfs_socket.c,v 1.190 2013/09/14 22:29:08 martin Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.189 2011/03/23 17:42:11 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.190 2013/09/14 22:29:08 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_nfs.h"
@@ -605,6 +605,8 @@
*/
#ifdef NFSKERB
XXX
+#else
+ (void)ktvin.tv_sec;
#endif
*tl++ = rpc_auth_kerb;
@@ -1165,6 +1167,8 @@
*/
#ifdef NFSKERB
XXX
+#else
+ (void)tvin.tv_sec;
#endif
tvout.tv_sec = fxdr_unsigned(long, tvout.tv_sec);
diff -r 477c4d27ef0a -r a37170107239 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Sat Sep 14 22:27:01 2013 +0000
+++ b/sys/nfs/nfs_vnops.c Sat Sep 14 22:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vnops.c,v 1.299 2013/03/18 19:35:45 plunky Exp $ */
Home |
Main Index |
Thread Index |
Old Index