pass lint; fix install.

This commit is contained in:
christos 2006-10-23 00:22:24 +00:00
parent 4b90889ec6
commit b6f6a56052
5 changed files with 36 additions and 35 deletions

View File

@ -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 <bsd.own.mk>
@ -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 <bsd.lib.mk>

View File

@ -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 <sys/cdefs.h>
#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;

View File

@ -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 <sys/cdefs.h>
#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 <puffs.h>
@ -132,6 +132,7 @@ puffsdump_cn(struct puffs_cn *pcn)
#endif
void
/*ARGSUSED*/
puffsdump_creds(struct puffs_cred *pcr)
{

View File

@ -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 <sys/cdefs.h>
#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 <sys/param.h>
@ -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;

View File

@ -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 <sys/cdefs.h>
#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 <sys/types.h>
@ -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];