diff --git a/lib/libpuffs/Makefile b/lib/libpuffs/Makefile index 5e8bfad88039..da2abfbe63b7 100644 --- a/lib/libpuffs/Makefile +++ b/lib/libpuffs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2006/10/22 23:51:37 dogcow Exp $ +# $NetBSD: Makefile,v 1.3 2006/10/23 00:22:24 christos Exp $ # .include @@ -8,5 +8,7 @@ WARNS= 4 LIB= puffs SRCS= puffs.c subr.c creds.c opdump.c INCS= puffs.h puffsdump.h +INCSDIR= /usr/include +LINTFLAGS+=-S -w .include diff --git a/lib/libpuffs/creds.c b/lib/libpuffs/creds.c index 865dddf17717..26f9f7fa2e02 100644 --- a/lib/libpuffs/creds.c +++ b/lib/libpuffs/creds.c @@ -1,4 +1,4 @@ -/* $NetBSD: creds.c,v 1.1 2006/10/22 22:52:21 pooka Exp $ */ +/* $NetBSD: creds.c,v 1.2 2006/10/23 00:22:24 christos Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -32,7 +32,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: creds.c,v 1.1 2006/10/22 22:52:21 pooka Exp $"); +__RCSID("$NetBSD: creds.c,v 1.2 2006/10/23 00:22:24 christos Exp $"); #endif /* !lint */ /* @@ -74,13 +74,13 @@ puffs_cred_getgid(const struct puffs_cred *pcr, gid_t *rgid) int puffs_cred_getgroups(const struct puffs_cred *pcr, gid_t *rgids, short *ngids) { - short ncopy; + size_t ncopy; if (!UUCCRED(pcr)) return EINVAL; ncopy = MIN(*ngids, NGROUPS); - memcpy(rgids, pcr->pcr_uuc.cr_groups, ncopy); + (void)memcpy(rgids, pcr->pcr_uuc.cr_groups, ncopy); *ngids = ncopy; return 0; diff --git a/lib/libpuffs/opdump.c b/lib/libpuffs/opdump.c index b0a97c3fe70c..0d574a163167 100644 --- a/lib/libpuffs/opdump.c +++ b/lib/libpuffs/opdump.c @@ -1,4 +1,4 @@ -/* $NetBSD: opdump.c,v 1.1 2006/10/22 22:52:21 pooka Exp $ */ +/* $NetBSD: opdump.c,v 1.2 2006/10/23 00:22:24 christos Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -36,7 +36,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: opdump.c,v 1.1 2006/10/22 22:52:21 pooka Exp $"); +__RCSID("$NetBSD: opdump.c,v 1.2 2006/10/23 00:22:24 christos Exp $"); #endif /* !lint */ #include @@ -132,6 +132,7 @@ puffsdump_cn(struct puffs_cn *pcn) #endif void +/*ARGSUSED*/ puffsdump_creds(struct puffs_cred *pcr) { diff --git a/lib/libpuffs/puffs.c b/lib/libpuffs/puffs.c index 19df3241db6b..742020f7dfb6 100644 --- a/lib/libpuffs/puffs.c +++ b/lib/libpuffs/puffs.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs.c,v 1.1 2006/10/22 22:52:21 pooka Exp $ */ +/* $NetBSD: puffs.c,v 1.2 2006/10/23 00:22:24 christos Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: puffs.c,v 1.1 2006/10/22 22:52:21 pooka Exp $"); +__RCSID("$NetBSD: puffs.c,v 1.2 2006/10/23 00:22:24 christos Exp $"); #endif /* !lint */ #include @@ -568,8 +568,6 @@ puffcall(struct puffs_usermount *pu, struct puffs_req *preq) case PUFFS_VN_PRINT: { - struct puffs_vnreq_print *auxt = preq->preq_aux; - (void)auxt; if (pu->pu_pvn.puffs_print == NULL) { error = 0; break; diff --git a/lib/libpuffs/subr.c b/lib/libpuffs/subr.c index 078cfe4184f5..43c3af510cb1 100644 --- a/lib/libpuffs/subr.c +++ b/lib/libpuffs/subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: subr.c,v 1.1 2006/10/22 22:52:21 pooka Exp $ */ +/* $NetBSD: subr.c,v 1.2 2006/10/23 00:22:24 christos Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: subr.c,v 1.1 2006/10/22 22:52:21 pooka Exp $"); +__RCSID("$NetBSD: subr.c,v 1.2 2006/10/23 00:22:24 christos Exp $"); #endif /* !lint */ #include @@ -106,7 +106,7 @@ puffs_nextdent(struct dirent **dent, const char *name, ino_t id, uint8_t dtype, d->d_fileno = id; d->d_type = dtype; d->d_namlen = strlen(name); - (void)memcpy(&d->d_name, name, d->d_namlen); + (void)memcpy(&d->d_name, name, (size_t)d->d_namlen); d->d_name[d->d_namlen] = '\0'; d->d_reclen = _DIRENT_SIZE(d); @@ -124,28 +124,28 @@ void puffs_setvattr(struct vattr *vap, const struct vattr *sva) { -#define SETIFVAL(a) if (sva->a != PUFFS_VNOVAL) vap->a = sva->a +#define SETIFVAL(a, t) if (sva->a != (t)PUFFS_VNOVAL) vap->a = sva->a if (sva->va_type != VNON) vap->va_type = sva->va_type; - SETIFVAL(va_mode); - SETIFVAL(va_nlink); - SETIFVAL(va_uid); - SETIFVAL(va_gid); - SETIFVAL(va_fsid); - SETIFVAL(va_size); - SETIFVAL(va_blocksize); - SETIFVAL(va_atime.tv_sec); - SETIFVAL(va_ctime.tv_sec); - SETIFVAL(va_mtime.tv_sec); - SETIFVAL(va_birthtime.tv_sec); - SETIFVAL(va_atime.tv_nsec); - SETIFVAL(va_ctime.tv_nsec); - SETIFVAL(va_mtime.tv_nsec); - SETIFVAL(va_birthtime.tv_nsec); - SETIFVAL(va_gen); - SETIFVAL(va_flags); - SETIFVAL(va_rdev); - SETIFVAL(va_bytes); + SETIFVAL(va_mode, mode_t); + SETIFVAL(va_nlink, nlink_t); + SETIFVAL(va_uid, uid_t); + SETIFVAL(va_gid, gid_t); + SETIFVAL(va_fsid, long); + SETIFVAL(va_size, u_quad_t); + SETIFVAL(va_blocksize, long); + SETIFVAL(va_atime.tv_sec, time_t); + SETIFVAL(va_ctime.tv_sec, time_t); + SETIFVAL(va_mtime.tv_sec, time_t); + SETIFVAL(va_birthtime.tv_sec, time_t); + SETIFVAL(va_atime.tv_nsec, long); + SETIFVAL(va_ctime.tv_nsec, long); + SETIFVAL(va_mtime.tv_nsec, long); + SETIFVAL(va_birthtime.tv_nsec, long); + SETIFVAL(va_gen, u_long); + SETIFVAL(va_flags, u_long); + SETIFVAL(va_rdev, dev_t); + SETIFVAL(va_bytes, u_quad_t); #undef SETIFVAL /* ignore va->va_vaflags */ } @@ -167,7 +167,7 @@ int puffs_vtype2dt(enum vtype vt) { - if (vt < 0 || vt > (sizeof(vdmap)/sizeof(vdmap[0]))) + if (/* vt < 0 || */ vt > (sizeof(vdmap)/sizeof(vdmap[0]))) return DT_UNKNOWN; return vdmap[vt];