complete WARNS=2 cleanup (with a bit of ickiness for the fts_open argv issue)
This commit is contained in:
parent
0b41840fcb
commit
f644bd620b
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.18 2001/10/09 05:19:03 enami Exp $
|
||||
# $NetBSD: Makefile,v 1.19 2001/10/18 05:06:01 lukem Exp $
|
||||
# from: @(#)Makefile 8.2 (Berkeley) 4/27/95
|
||||
|
||||
PROG= mtree
|
||||
@ -6,6 +6,7 @@ PROG= mtree
|
||||
MAN= mtree.8
|
||||
SRCS= compare.c crc.c create.c misc.c mtree.c spec.c verify.c \
|
||||
stat_flags.c pack_dev.c
|
||||
WARNS?= 2
|
||||
|
||||
LDADD+= -lutil
|
||||
DPADD+= ${LIBUTIL}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: create.c,v 1.33 2001/10/18 04:37:56 lukem Exp $ */
|
||||
/* $NetBSD: create.c,v 1.34 2001/10/18 05:06:02 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: create.c,v 1.33 2001/10/18 04:37:56 lukem Exp $");
|
||||
__RCSID("$NetBSD: create.c,v 1.34 2001/10/18 05:06:02 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -85,7 +85,9 @@ cwalk(void)
|
||||
FTS *t;
|
||||
FTSENT *p;
|
||||
time_t clocktime;
|
||||
char *argv[2], host[MAXHOSTNAMELEN + 1];
|
||||
char host[MAXHOSTNAMELEN + 1];
|
||||
char dot[] = "."; /* XXX: work around gcc warning */
|
||||
char *argv[] = { dot, NULL };
|
||||
|
||||
(void)time(&clocktime);
|
||||
(void)gethostname(host, sizeof(host));
|
||||
@ -94,8 +96,6 @@ cwalk(void)
|
||||
"#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n#\t date: %s",
|
||||
getlogin(), host, fullpath, ctime(&clocktime));
|
||||
|
||||
argv[0] = ".";
|
||||
argv[1] = NULL;
|
||||
if ((t = fts_open(argv, ftsoptions, dsort)) == NULL)
|
||||
mtree_err("fts_open: %s", strerror(errno));
|
||||
while ((p = fts_read(t)) != NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: verify.c,v 1.20 2001/10/09 04:50:01 lukem Exp $ */
|
||||
/* $NetBSD: verify.c,v 1.21 2001/10/18 05:06:02 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: verify.c,v 1.20 2001/10/09 04:50:01 lukem Exp $");
|
||||
__RCSID("$NetBSD: verify.c,v 1.21 2001/10/18 05:06:02 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -79,10 +79,9 @@ vwalk(void)
|
||||
FTSENT *p;
|
||||
NODE *ep, *level;
|
||||
int ftsdepth, specdepth, rval;
|
||||
char *argv[2];
|
||||
char dot[] = "."; /* XXX: work around gcc warning */
|
||||
char *argv[] = { dot, NULL };
|
||||
|
||||
argv[0] = ".";
|
||||
argv[1] = NULL;
|
||||
if ((t = fts_open(argv, ftsoptions, NULL)) == NULL)
|
||||
mtree_err("fts_open: %s", strerror(errno));
|
||||
level = root;
|
||||
|
Loading…
Reference in New Issue
Block a user