diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-11 11:21:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-11 11:21:56 +0000 |
commit | 089ed1a3a82f83c83dbed0cd6c1fbad0d2749bba (patch) | |
tree | 78f2ef7bf93b8c8a253ea34f9796334e9fe49ba7 | |
parent | bbea39e22899df0a7ea946b6e4372463e041e28e (diff) |
cleanup -Wall
-rw-r--r-- | usr.bin/size/size.c | 11 | ||||
-rw-r--r-- | usr.bin/soelim/soelim.c | 7 | ||||
-rw-r--r-- | usr.bin/strings/strings.c | 9 | ||||
-rw-r--r-- | usr.bin/strip/strip.c | 9 | ||||
-rw-r--r-- | usr.bin/su/su.c | 12 |
5 files changed, 30 insertions, 18 deletions
diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index c9bdc02c90d..ea6a7b17040 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -1,4 +1,4 @@ -/* $OpenBSD: size.c,v 1.7 1997/08/23 01:59:21 mickey Exp $ */ +/* $OpenBSD: size.c,v 1.8 1997/09/11 11:21:52 deraadt Exp $ */ /* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93"; #endif -static char rcsid[] = "$OpenBSD: size.c,v 1.7 1997/08/23 01:59:21 mickey Exp $"; +static char rcsid[] = "$OpenBSD: size.c,v 1.8 1997/09/11 11:21:52 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -55,6 +55,8 @@ static char rcsid[] = "$OpenBSD: size.c,v 1.7 1997/08/23 01:59:21 mickey Exp $"; #include <unistd.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> +#include <ctype.h> #include <err.h> unsigned long total_text, total_data, total_bss, total_total; @@ -63,6 +65,7 @@ int print_totals = 0; int process_file __P((int, char *)); int show_archive __P((int, char *, FILE *)); +int show_objfile __P((int, char *, FILE *)); int show_object __P((int, char *, FILE *)); void *emalloc __P((size_t)); void *erealloc __P((void *, size_t)); @@ -320,7 +323,7 @@ emalloc(size) char *p; /* NOSTRICT */ - if (p = malloc(size)) + if ((p = malloc(size))) return(p); err(1, NULL); } @@ -331,7 +334,7 @@ erealloc(p, size) size_t size; { /* NOSTRICT */ - if (p = realloc(p, size)) + if ((p = realloc(p, size))) return(p); err(1, NULL); } diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c index 1038ab36d87..af2e35d459e 100644 --- a/usr.bin/soelim/soelim.c +++ b/usr.bin/soelim/soelim.c @@ -1,4 +1,4 @@ -/* $OpenBSD: soelim.c,v 1.2 1996/06/26 05:39:26 deraadt Exp $ */ +/* $OpenBSD: soelim.c,v 1.3 1997/09/11 11:21:53 deraadt Exp $ */ /* $NetBSD: soelim.c,v 1.3 1994/12/21 08:11:26 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)soelim.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: soelim.c,v 1.2 1996/06/26 05:39:26 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: soelim.c,v 1.3 1997/09/11 11:21:53 deraadt Exp $"; #endif /* not lint */ #include <stdio.h> @@ -66,6 +66,9 @@ static char rcsid[] = "$OpenBSD: soelim.c,v 1.2 1996/06/26 05:39:26 deraadt Exp */ #define STDIN_NAME "-" +int process __P((char *file)); + +int main(argc, argv) int argc; char *argv[]; diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 0b7f788c650..a730c078b7b 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strings.c,v 1.3 1997/06/17 23:53:16 deraadt Exp $ */ +/* $OpenBSD: strings.c,v 1.4 1997/09/11 11:21:54 deraadt Exp $ */ /* $NetBSD: strings.c,v 1.7 1995/02/15 15:49:19 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)strings.c 8.2 (Berkeley) 1/28/94"; #endif -static char rcsid[] = "$OpenBSD: strings.c,v 1.3 1997/06/17 23:53:16 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: strings.c,v 1.4 1997/09/11 11:21:54 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -74,8 +74,10 @@ static int hcnt, /* head count */ read_len; /* length to read */ static u_char hbfr[sizeof(EXEC)]; /* buffer for struct exec */ -static void usage(); +static void usage __P((void)); +int getch __P((void)); +int main(argc, argv) int argc; char **argv; @@ -227,6 +229,7 @@ nextfile: ; * getch -- * get next character from wherever */ +int getch() { ++foff; diff --git a/usr.bin/strip/strip.c b/usr.bin/strip/strip.c index 1976e4b7716..34b8d244002 100644 --- a/usr.bin/strip/strip.c +++ b/usr.bin/strip/strip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strip.c,v 1.8 1997/04/03 19:33:50 mickey Exp $ */ +/* $OpenBSD: strip.c,v 1.9 1997/09/11 11:21:54 deraadt Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)strip.c 5.8 (Berkeley) 11/6/91";*/ -static char rcsid[] = "$OpenBSD: strip.c,v 1.8 1997/04/03 19:33:50 mickey Exp $"; +static char rcsid[] = "$OpenBSD: strip.c,v 1.9 1997/09/11 11:21:54 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -68,11 +68,12 @@ void usage __P((void)); int xflag = 0; +int main(argc, argv) int argc; char *argv[]; { - register int fd, nb; + register int fd; EXEC *ep; struct stat sb; int (*sfcn)__P((const char *, int, EXEC *, struct stat *)); @@ -97,7 +98,7 @@ main(argc, argv) errors = 0; #define ERROR(x) errors |= 1; warnx("%s: %s", fn, strerror(x)); continue; - while (fn = *argv++) { + while ((fn = *argv++)) { if ((fd = open(fn, O_RDWR)) < 0) { ERROR(errno); } diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 40efb00d1a0..8a31627a2ff 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $ */ +/* $OpenBSD: su.c,v 1.30 1997/09/11 11:21:55 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.30 1997/09/11 11:21:55 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -68,6 +68,8 @@ static char rcsid[] = "$OpenBSD: su.c,v 1.29 1997/06/29 11:10:35 provos Exp $"; #include <kerberosIV/krb.h> #include <netdb.h> +int kerberos __P((char *username, char *user, int uid)); + #define ARGSTR "-Kflm" int use_kerberos = 1; @@ -218,7 +220,7 @@ badlogin: iscsh = NO; } - if (p = strrchr(shell, '/')) + if ((p = strrchr(shell, '/'))) avshell = p+1; else avshell = shell; @@ -319,12 +321,13 @@ ontty() static char buf[MAXPATHLEN + 4]; buf[0] = 0; - if (p = ttyname(STDERR_FILENO)) + if ((p = ttyname(STDERR_FILENO))) snprintf(buf, sizeof(buf), " on %s", p); return (buf); } #ifdef KERBEROS +int kerberos(username, user, uid) char *username, *user; int uid; @@ -332,7 +335,6 @@ kerberos(username, user, uid) KTEXT_ST ticket; AUTH_DAT authdata; struct hostent *hp; - register char *p; int kerno; in_addr_t faddr; char hostname[MAXHOSTNAMELEN], savehost[MAXHOSTNAMELEN]; |