From 8e693f1039d99cbc53561b7670a0f4ac7ad295bf Mon Sep 17 00:00:00 2001 From: millert <> Date: Tue, 18 Nov 1997 19:57:29 +0000 Subject: [PATCH] -Wall --- src/lib/libutil/login_fbtab.c | 3 ++- src/lib/libutil/passwd.c | 18 +++++++++++------- src/lib/libutil/readlabel.c | 4 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/lib/libutil/login_fbtab.c b/src/lib/libutil/login_fbtab.c index a6b6379f..64619956 100644 --- a/src/lib/libutil/login_fbtab.c +++ b/src/lib/libutil/login_fbtab.c @@ -65,6 +65,7 @@ #include #include #include +#include #include "util.h" @@ -91,7 +92,7 @@ login_fbtab(tty, uid, gid) return; while (fgets(buf, sizeof(buf), fp)) { - if (cp = strchr(buf, '#')) + if ((cp = strchr(buf, '#'))) *cp = 0; /* strip comment */ if ((cp = devname = strtok(buf, WSPACE)) == 0) continue; /* empty or comment */ diff --git a/src/lib/libutil/passwd.c b/src/lib/libutil/passwd.c index d01a6245..a411e70d 100644 --- a/src/lib/libutil/passwd.c +++ b/src/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.15 1997/11/17 22:46:03 millert Exp $ */ +/* $OpenBSD: passwd.c,v 1.16 1997/11/18 19:57:28 millert Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: passwd.c,v 1.15 1997/11/17 22:46:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.16 1997/11/18 19:57:28 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -48,7 +48,9 @@ static char rcsid[] = "$OpenBSD: passwd.c,v 1.15 1997/11/17 22:46:03 millert Exp #include #include #include +#include #include +#include #include #include #include @@ -96,7 +98,7 @@ read_line(fp, line, max) char *line; int max; { - char *p, *c; + char *p; /* Read one line of config */ if (fgets(line, max, fp) == 0) return 0; @@ -266,7 +268,6 @@ pw_mkdb() { int pstat; pid_t pid; - char *lock; struct stat sb; /* A zero length passwd file is never ok */ @@ -350,6 +351,9 @@ pw_edit(notsetuid, filename) char *p, *editor; char *argp[] = {"sh", "-c", NULL, NULL}; +#ifdef __GNUC__ + (void)&editor; +#endif if (!filename) { filename = pw_lck; if (!filename) @@ -447,7 +451,7 @@ pw_copy(ffd, tfd, pw) goto err; continue; } - (void)fprintf(to, "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s\n", + (void)fprintf(to, "%s:%s:%d:%d:%s:%d:%d:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell); @@ -456,7 +460,7 @@ pw_copy(ffd, tfd, pw) goto err; } if (!done) - (void)fprintf(to, "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s\n", + (void)fprintf(to, "%s:%s:%d:%d:%s:%d:%d:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell); @@ -550,7 +554,7 @@ pw_scan(bp, pw, flags) break; } - if (p = strsep(&bp, ":")) { /* too many */ + if ((p = strsep(&bp, ":"))) { /* too many */ fmt: warnx("corrupted entry"); return (0); } diff --git a/src/lib/libutil/readlabel.c b/src/lib/libutil/readlabel.c index 906d6ba1..7b921f6b 100644 --- a/src/lib/libutil/readlabel.c +++ b/src/lib/libutil/readlabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readlabel.c,v 1.3 1996/12/23 07:43:42 downsj Exp $ */ +/* $OpenBSD: readlabel.c,v 1.4 1997/11/18 19:57:29 millert Exp $ */ /* * Copyright (c) 1996, Jason Downs. All rights reserved. @@ -32,10 +32,12 @@ #include #include #include +#include #include #include #define DKTYPENAMES #include +#include #include #include