diff options
author | jkh <jkh@FreeBSD.org> | 1996-07-12 19:08:36 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-07-12 19:08:36 +0000 |
commit | 730964efd28b80be48ed35a215a362dde2b6b7a7 (patch) | |
tree | b07c215aa55db3fb81db462f4bc70f61cd56c57f /usr.bin/ranlib | |
parent | c4d4a99d31762beef936f34571330923e9300da9 (diff) | |
download | FreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.zip FreeBSD-src-730964efd28b80be48ed35a215a362dde2b6b7a7.tar.gz |
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Diffstat (limited to 'usr.bin/ranlib')
-rw-r--r-- | usr.bin/ranlib/build.c | 10 | ||||
-rw-r--r-- | usr.bin/ranlib/misc.c | 10 | ||||
-rw-r--r-- | usr.bin/ranlib/ranlib.c | 11 | ||||
-rw-r--r-- | usr.bin/ranlib/touch.c | 8 |
4 files changed, 33 insertions, 6 deletions
diff --git a/usr.bin/ranlib/build.c b/usr.bin/ranlib/build.c index 0951f2e..3b70630 100644 --- a/usr.bin/ranlib/build.c +++ b/usr.bin/ranlib/build.c @@ -48,10 +48,17 @@ static char sccsid[] = "@(#)build.c 8.1 (Berkeley) 6/6/93"; #include <fcntl.h> #include <ranlib.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <unistd.h> #include "archive.h" +extern int tmp __P(( void )); +extern void error __P(( char * )); +extern void badfmt __P(( void )); +extern void settime __P(( int )); + extern CHDR chdr; /* converted header */ extern char *archive; /* archive name */ extern char *tname; /* temporary file "name" */ @@ -72,7 +79,8 @@ long tsymlen; /* total string length */ static void rexec __P((int, int)); static void symobj __P((void)); -build() +int +build(void) { CF cf; int afd, tfd; diff --git a/usr.bin/ranlib/misc.c b/usr.bin/ranlib/misc.c index 5d1fe8f..600e49e 100644 --- a/usr.bin/ranlib/misc.c +++ b/usr.bin/ranlib/misc.c @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93"; #include <sys/signal.h> #include <errno.h> #include <unistd.h> +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -50,7 +51,10 @@ static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93"; extern char *archive; /* archive name */ char *tname = "temporary file"; /* temporary file "name" */ -tmp() +void error __P(( char * )); + +int +tmp(void) { sigset_t set, oset; int fd; @@ -90,12 +94,14 @@ rname(path) return((ind = rindex(path, '/')) ? ind + 1 : path); } -badfmt() +void +badfmt(void) { errno = EFTYPE; error(archive); } +void error(name) char *name; { diff --git a/usr.bin/ranlib/ranlib.c b/usr.bin/ranlib/ranlib.c index 9d1d8a1..c109139 100644 --- a/usr.bin/ranlib/ranlib.c +++ b/usr.bin/ranlib/ranlib.c @@ -50,10 +50,15 @@ static char sccsid[] = "@(#)ranlib.c 8.1 (Berkeley) 6/6/93"; #include <stdlib.h> #include <archive.h> +extern int build __P(( void )); +extern int touch __P(( void )); +void usage __P((void)); + CHDR chdr; u_int options; /* UNUSED -- keep open_archive happy */ char *archive; +int main(argc, argv) int argc; char **argv; @@ -77,13 +82,15 @@ main(argc, argv) if (!*argv) usage(); - for (eval = 0; archive = *argv++;) + for (eval = 0; (archive = *argv++); ) eval |= tflag ? touch() : build(); exit(eval); } -usage() +void +usage(void) { (void)fprintf(stderr, "usage: ranlib [-t] archive ...\n"); exit(1); } + diff --git a/usr.bin/ranlib/touch.c b/usr.bin/ranlib/touch.c index 0dd9123..68a86a4 100644 --- a/usr.bin/ranlib/touch.c +++ b/usr.bin/ranlib/touch.c @@ -52,7 +52,12 @@ static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; extern CHDR chdr; /* converted header */ extern char *archive; /* archive name */ -touch() +extern void error __P(( char * )); +void settime __P(( int )); +int touch __P(( void )); + +int +touch(void) { int afd; @@ -69,6 +74,7 @@ touch() return(0); } +void settime(afd) int afd; { |