diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-09-15 09:32:02 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-09-15 09:32:02 +0000 |
commit | 5839b84db8fa4a49976868786c93b29df9c4d568 (patch) | |
tree | ef3d545e61baa18f319312ada4e97e2c799c24c6 | |
parent | 1d3f47d20a2b64c481a047ce24f39564b3e74533 (diff) |
Remove dead code
Remove unused variables
Silence some warnings
lint(1) is your friend
68 files changed, 198 insertions, 238 deletions
diff --git a/lib/libc/arch/i386/gen/infinity.c b/lib/libc/arch/i386/gen/infinity.c index f5e73d7bbdb..839cd034c82 100644 --- a/lib/libc/arch/i386/gen/infinity.c +++ b/lib/libc/arch/i386/gen/infinity.c @@ -1,5 +1,5 @@ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: infinity.c,v 1.2 1996/08/19 08:12:30 tholo Exp $"; +static char rcsid[] = "$OpenBSD: infinity.c,v 1.3 1996/09/15 09:30:42 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* infinity.c */ @@ -7,4 +7,4 @@ static char rcsid[] = "$OpenBSD: infinity.c,v 1.2 1996/08/19 08:12:30 tholo Exp #include <math.h> /* bytes for +Infinity on a 387 */ -char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +char __infinity[] = { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f }; diff --git a/lib/libc/compat-43/__setregid.c b/lib/libc/compat-43/__setregid.c index c13d2bbb133..c8f4d058708 100644 --- a/lib/libc/compat-43/__setregid.c +++ b/lib/libc/compat-43/__setregid.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: __setregid.c,v 1.2 1996/08/19 08:19:14 tholo Exp $"; +static char *rcsid = "$OpenBSD: __setregid.c,v 1.3 1996/09/15 09:30:44 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,20 +43,20 @@ int __setregid(rgid, egid) gid_t rgid, egid; { - static gid_t svgid = -1; + static gid_t svgid = (gid_t) -1; - if (svgid == -1) + if (svgid == (gid_t) -1) svgid = getegid(); /* * we assume that the intent of setting rgid is to be able to get * back rgid priviledge. So we make sure that we will be able to * do so, but do not actually set the rgid. */ - if (rgid != -1 && rgid != getgid() && rgid != svgid) { + if (rgid != (gid_t) -1 && rgid != getgid() && rgid != svgid) { errno = EPERM; return (-1); } - if (egid != -1 && setegid(egid) < 0) + if (egid != (gid_t) -1 && setegid(egid) < 0) return (-1); return (0); } diff --git a/lib/libc/compat-43/__setreuid.c b/lib/libc/compat-43/__setreuid.c index a62d627e485..cf8ac987ac1 100644 --- a/lib/libc/compat-43/__setreuid.c +++ b/lib/libc/compat-43/__setreuid.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: __setreuid.c,v 1.2 1996/08/19 08:19:15 tholo Exp $"; +static char *rcsid = "$OpenBSD: __setreuid.c,v 1.3 1996/09/15 09:30:45 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,20 +43,20 @@ int __setreuid(ruid, euid) uid_t ruid, euid; { - static uid_t svuid = -1; + static uid_t svuid = (uid_t) -1; - if (svuid == -1) + if (svuid == (uid_t) -1) svuid = geteuid(); /* * we assume that the intent of setting ruid is to be able to get * back ruid priviledge. So we make sure that we will be able to * do so, but do not actually set the ruid. */ - if (ruid != -1 && ruid != getuid() && ruid != svuid) { + if (ruid != (uid_t) -1 && ruid != getuid() && ruid != svuid) { errno = EPERM; return (-1); } - if (euid != -1 && seteuid(euid) < 0) + if (euid != (uid_t) -1 && seteuid(euid) < 0) return (-1); return (0); } diff --git a/lib/libc/crypt/md5crypt.c b/lib/libc/crypt/md5crypt.c index 0efd81c36e8..3e3c681c8eb 100644 --- a/lib/libc/crypt/md5crypt.c +++ b/lib/libc/crypt/md5crypt.c @@ -9,11 +9,12 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.4 1996/08/19 08:19:50 tholo Exp $"; +static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.5 1996/09/15 09:30:46 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <unistd.h> #include <stdio.h> +#include <string.h> #include <md5.h> static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 66ccc848e86..e762e5ff5f3 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash.c,v 1.3 1996/08/19 08:20:31 tholo Exp $"; +static char rcsid[] = "$OpenBSD: hash.c,v 1.4 1996/09/15 09:30:47 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -92,6 +92,7 @@ int hash_accesses, hash_collisions, hash_expansions, hash_overflows; /************************** INTERFACE ROUTINES ***************************/ /* OPEN/CLOSE */ +/* ARGSUSED */ extern DB * __hash_open(file, flags, mode, info, dflags) const char *file; diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c index 515dcceb719..766948a1b11 100644 --- a/lib/libc/db/hash/hash_bigkey.c +++ b/lib/libc/db/hash/hash_bigkey.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.3 1996/08/19 08:20:34 tholo Exp $"; +static char rcsid[] = "$OpenBSD: hash_bigkey.c,v 1.4 1996/09/15 09:30:48 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -431,7 +431,7 @@ __big_return(hashp, bufp, ndx, val, set_current) } val->size = collect_data(hashp, bufp, (int)len, set_current); - if (val->size == -1) + if (val->size == (size_t) -1) return (-1); if (save_p->addr != save_addr) { /* We are pretty short on buffers. */ @@ -510,7 +510,7 @@ __big_keydata(hashp, bufp, key, val, set) int set; { key->size = collect_key(hashp, bufp, 0, val, set); - if (key->size == -1) + if (key->size == (size_t) -1) return (-1); key->data = (u_char *)hashp->tmp_key; return (0); diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index 085f758b12a..5c8b52604c6 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: hash_func.c,v 1.3 1996/08/19 08:20:37 tholo Exp $"; +static char rcsid[] = "$OpenBSD: hash_func.c,v 1.4 1996/09/15 09:30:49 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -45,9 +45,11 @@ static char rcsid[] = "$OpenBSD: hash_func.c,v 1.3 1996/08/19 08:20:37 tholo Exp #include "page.h" #include "extern.h" +#ifdef notdef static u_int32_t hash1 __P((const void *, size_t)); static u_int32_t hash2 __P((const void *, size_t)); static u_int32_t hash3 __P((const void *, size_t)); +#endif static u_int32_t hash4 __P((const void *, size_t)); /* Global default hash function */ @@ -62,6 +64,9 @@ u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4; * This came from ejb's hsearch. */ +#ifdef notdef + + #define PRIME1 37 #define PRIME2 1048583 @@ -160,6 +165,7 @@ hash3(keyarg, len) } return (h); } +#endif /* Hash function from Chris Torek. */ static u_int32_t diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index e37cc9968bc..69d5fbadfc7 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mpool.c,v 1.3 1996/08/19 08:20:52 tholo Exp $"; +static char rcsid[] = "$OpenBSD: mpool.c,v 1.4 1996/09/15 09:30:51 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -58,6 +58,7 @@ static int mpool_write __P((MPOOL *, BKT *)); * mpool_open -- * Initialize a memory pool. */ +/* ARGSUSED */ MPOOL * mpool_open(key, fd, pagesize, maxcache) void *key; @@ -149,6 +150,7 @@ mpool_new(mp, pgnoaddr) * mpool_get * Get a page. */ +/* ARGSUSED */ void * mpool_get(mp, pgno, flags) MPOOL *mp; @@ -234,6 +236,7 @@ mpool_get(mp, pgno, flags) * mpool_put * Return a page. */ +/* ARGSUSED */ int mpool_put(mp, page, flags) MPOOL *mp; diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index ec734b6f482..9c64ddc9964 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: rec_close.c,v 1.3 1996/08/19 08:20:58 tholo Exp $"; +static char rcsid[] = "$OpenBSD: rec_close.c,v 1.4 1996/09/15 09:30:53 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -155,7 +155,7 @@ __rec_sync(dbp, flags) status = (dbp->seq)(dbp, &key, &data, R_NEXT); } } else { - iov[1].iov_base = &t->bt_bval; + iov[1].iov_base = (char *) &t->bt_bval; iov[1].iov_len = 1; status = (dbp->seq)(dbp, &key, &data, R_FIRST); diff --git a/lib/libc/gen/alarm.c b/lib/libc/gen/alarm.c index bc85cff4cf4..2e8f75a4cfd 100644 --- a/lib/libc/gen/alarm.c +++ b/lib/libc/gen/alarm.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: alarm.c,v 1.2 1996/08/19 08:21:43 tholo Exp $"; +static char rcsid[] = "$OpenBSD: alarm.c,v 1.3 1996/09/15 09:30:54 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -52,7 +52,7 @@ alarm(secs) itp->it_value.tv_sec = secs; itp->it_value.tv_usec = 0; if (setitimer(ITIMER_REAL, itp, &oitv) < 0) - return (-1); + return ((unsigned int) -1); if (oitv.it_value.tv_usec) oitv.it_value.tv_sec++; return (oitv.it_value.tv_sec); diff --git a/lib/libc/gen/confstr.c b/lib/libc/gen/confstr.c index f391bf86dfd..cb25deed19a 100644 --- a/lib/libc/gen/confstr.c +++ b/lib/libc/gen/confstr.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: confstr.c,v 1.2 1996/08/19 08:21:59 tholo Exp $"; +static char rcsid[] = "$OpenBSD: confstr.c,v 1.3 1996/09/15 09:30:55 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -59,15 +59,15 @@ confstr(name, buf, len) mib[0] = CTL_USER; mib[1] = USER_CS_PATH; if (sysctl(mib, 2, NULL, &tlen, NULL, 0) == -1) - return (-1); + return ((size_t) -1); if (len != 0 && buf != NULL) { if ((p = malloc(tlen)) == NULL) - return (-1); + return ((size_t) -1); if (sysctl(mib, 2, p, &tlen, NULL, 0) == -1) { sverrno = errno; free(p); errno = sverrno; - return (-1); + return ((size_t) -1); } /* * POSIX 1003.2 requires partial return of diff --git a/lib/libc/gen/ctype_.c b/lib/libc/gen/ctype_.c index 99de11571ae..c3fd0372ab8 100644 --- a/lib/libc/gen/ctype_.c +++ b/lib/libc/gen/ctype_.c @@ -37,7 +37,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ctype_.c,v 1.2 1996/08/19 08:22:08 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ctype_.c,v 1.3 1996/09/15 09:30:56 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <ctype.h> @@ -48,7 +48,7 @@ const char _C_ctype_[1 + 256] = { _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, _C, - _S|_B, _P, _P, _P, _P, _P, _P, _P, + _S|(char)_B, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _P, _N, _N, _N, _N, _N, _N, _N, _N, _N, _N, _P, _P, _P, _P, _P, _P, diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index 1bd3c6b3be4..8b81c83f10a 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.2 1996/08/19 08:22:24 tholo Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.3 1996/09/15 09:30:58 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -48,7 +48,6 @@ static char rcsid[] = "$OpenBSD: disklabel.c,v 1.2 1996/08/19 08:22:24 tholo Exp #include <string.h> #include <unistd.h> -static void error __P((int)); static int gettype __P((char *, char **)); struct disklabel * @@ -173,17 +172,3 @@ gettype(t, names) return (atoi(t)); return (0); } - -static void -error(err) - int err; -{ - char *p; - - (void)write(STDERR_FILENO, "disktab: ", 9); - (void)write(STDERR_FILENO, _PATH_DISKTAB, sizeof(_PATH_DISKTAB) - 1); - (void)write(STDERR_FILENO, ": ", 2); - p = strerror(err); - (void)write(STDERR_FILENO, p, strlen(p)); - (void)write(STDERR_FILENO, "\n", 1); -} diff --git a/lib/libc/gen/errlist.c b/lib/libc/gen/errlist.c index 12f2b4e82f3..64e598425ad 100644 --- a/lib/libc/gen/errlist.c +++ b/lib/libc/gen/errlist.c @@ -32,10 +32,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: errlist.c,v 1.2 1996/08/19 08:22:32 tholo Exp $"; +static char *rcsid = "$OpenBSD: errlist.c,v 1.3 1996/09/15 09:30:59 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ -const char *const _sys_errlist[] = { +#ifdef lint +char * +#else +const char *const +#endif + _sys_errlist[] = { "Undefined error: 0", /* 0 - ENOERROR */ "Operation not permitted", /* 1 - EPERM */ "No such file or directory", /* 2 - ENOENT */ diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index 42c71917d70..332af9697ec 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getcap.c,v 1.2 1996/08/19 08:23:10 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getcap.c,v 1.3 1996/09/15 09:31:00 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -192,7 +192,6 @@ getent(cap, len, db_array, fd, name, depth, nfield) int fd, depth; { DB *capdbp; - DBT key, data; register char *r_end, *rp, **db_p; int myfd, eof, foundit, retval, clen; char *record, *cbuf; @@ -539,8 +538,6 @@ cdbget(capdbp, bp, name) char **bp, *name; { DBT key, data; - char *buf; - int st; key.data = name; key.size = strlen(name); @@ -648,7 +645,7 @@ cgetnext(bp, db_array) char **db_array; { size_t len; - int status, i, done; + int status, done; char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE]; u_int dummy; @@ -705,7 +702,6 @@ cgetnext(bp, db_array) /* * Line points to a name line. */ - i = 0; done = 0; np = nbuf; for (;;) { diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index cfcdba77be4..ae44c99cfe1 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.3 1996/08/19 08:23:32 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.4 1996/09/15 09:31:01 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -50,7 +50,6 @@ getgrouplist(uname, agroup, groups, grpcnt) int *grpcnt; { register struct group *grp; - register struct passwd *pw; register int i, ngroups; int ret, maxgroups; diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 4c4ca6b763c..dc7d07cc809 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.3 1996/08/19 08:24:02 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.4 1996/09/15 09:31:02 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -258,7 +258,6 @@ getpwent() DBT key; char bf[sizeof(_pw_keynum) + 1]; #ifdef YP - char *cp; static char *name = (char *)NULL; const char *user, *host, *dom; int has_yppw; @@ -594,8 +593,6 @@ pwnam_netgrp: break; } break; - - continue; } if(strcmp(_pw_passwd.pw_name, name) == 0) { if (!_pw_stayopen) { @@ -781,8 +778,6 @@ pwuid_netgrp: break; } break; - - continue; } if( _pw_passwd.pw_uid == uid) { if (!_pw_stayopen) { diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index 014bdfbaf74..1ec45a1e52f 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getttyent.c,v 1.2 1996/08/19 08:24:10 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getttyent.c,v 1.3 1996/09/15 09:31:03 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <ttyent.h> @@ -43,6 +43,9 @@ static char rcsid[] = "$OpenBSD: getttyent.c,v 1.2 1996/08/19 08:24:10 tholo Exp static char zapchar; static FILE *tf; +static char *skip __P((char *)); +static char *value __P((char *)); + struct ttyent * getttynam(tty) const char *tty; @@ -65,7 +68,6 @@ getttyent() register char *p; #define MAXLINELENGTH 200 static char line[MAXLINELENGTH]; - static char *skip(), *value(); if (!tf && !setttyent()) return (NULL); diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 453cb048689..1c1ac0014c5 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: nlist.c,v 1.14 1996/08/19 08:25:09 tholo Exp $"; +static char rcsid[] = "$OpenBSD: nlist.c,v 1.15 1996/09/15 09:31:04 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -314,7 +314,7 @@ __elf_fdnlist(fd, list) /* mmap section header table */ shdr = (Elf32_Shdr *)mmap(NULL, (size_t)shdr_size, - PROT_READ, 0, fd, ehdr.e_shoff); + PROT_READ, 0, fd, (off_t) ehdr.e_shoff); if (shdr == (Elf32_Shdr *)-1) return (-1); @@ -349,7 +349,7 @@ __elf_fdnlist(fd, list) * making the memory allocation permanent as with malloc/free * (i.e., munmap will return it to the system). */ - strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd, symstroff); + strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd, (off_t) symstroff); if (strtab == (char *)-1) return (-1); /* @@ -376,7 +376,7 @@ __elf_fdnlist(fd, list) if (symoff == 0) goto done; - if (lseek(fd, symoff, SEEK_SET) == -1) { + if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) { nent = -1; goto done; } @@ -473,7 +473,6 @@ nlist(name, list) struct nlist *list; { int fd, n; - int i; fd = open(name, O_RDONLY, 0); if (fd < 0) diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index 8ed5f37d6de..cf389ee10c8 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -32,13 +32,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sleep.c,v 1.4 1996/08/19 08:26:20 tholo Exp $"; +static char rcsid[] = "$OpenBSD: sleep.c,v 1.5 1996/09/15 09:31:05 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/time.h> #include <signal.h> #include <unistd.h> +static void sleephandler __P((int)); static volatile int ringring; unsigned int @@ -49,7 +50,6 @@ sleep(seconds) struct sigaction act, oact; struct timeval diff; sigset_t set, oset; - static void sleephandler(); if (!seconds) return 0; @@ -119,8 +119,10 @@ sleep(seconds) return (itv.it_value.tv_sec); } +/* ARGSUSED */ static void -sleephandler() +sleephandler(sig) + int sig; { ringring = 1; } diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 3f14c9a7769..49bd847aeff 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sysconf.c,v 1.2 1996/08/19 08:26:24 tholo Exp $"; +static char rcsid[] = "$OpenBSD: sysconf.c,v 1.3 1996/09/15 09:31:06 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -62,7 +62,6 @@ long sysconf(name) int name; { - struct clockinfo clk; struct rlimit rl; size_t len; int mib[2], value; diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c index 7fe01255296..1d01f7b6294 100644 --- a/lib/libc/gen/ttyname.c +++ b/lib/libc/gen/ttyname.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ttyname.c,v 1.2 1996/08/19 08:27:02 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ttyname.c,v 1.3 1996/09/15 09:31:07 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -85,6 +85,7 @@ ttyname(fd) return (oldttyname(fd, &sb)); } +/* ARGSUSED */ static char * oldttyname(fd, sb) int fd; diff --git a/lib/libc/gen/ualarm.c b/lib/libc/gen/ualarm.c index 28939019ed3..02f760d4db9 100644 --- a/lib/libc/gen/ualarm.c +++ b/lib/libc/gen/ualarm.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ualarm.c,v 1.2 1996/08/19 08:27:08 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ualarm.c,v 1.3 1996/09/15 09:31:08 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/time.h> @@ -45,7 +45,7 @@ static char rcsid[] = "$OpenBSD: ualarm.c,v 1.2 1996/08/19 08:27:08 tholo Exp $" * If ``reload'' is non-zero, keep generating SIGALRM * every ``reload'' microseconds after the first signal. */ -unsigned +u_int ualarm(usecs, reload) register unsigned usecs; register unsigned reload; @@ -61,5 +61,5 @@ ualarm(usecs, reload) if (setitimer(ITIMER_REAL, &new, &old) == 0) return (old.it_value.tv_sec * USPS + old.it_value.tv_usec); /* else */ - return (-1); + return ((u_int)-1); } diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c index ef58fcad34a..3111805e82f 100644 --- a/lib/libc/gen/uname.c +++ b/lib/libc/gen/uname.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: uname.c,v 1.4 1996/08/19 08:27:12 tholo Exp $"; +static char rcsid[] = "$OpenBSD: uname.c,v 1.5 1996/09/15 09:31:09 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -45,7 +45,6 @@ uname(name) { int mib[2], rval; size_t len; - char *p; rval = 0; diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index dd74922b36b..e6eabd334e0 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: unvis.c,v 1.3 1996/08/19 08:27:16 tholo Exp $"; +static char rcsid[] = "$OpenBSD: unvis.c,v 1.4 1996/09/15 09:31:10 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -97,7 +97,7 @@ unvis(cp, c, astate, flag) *astate = S_OCTAL2; return (0); case 'M': - *cp = 0200; + *cp = (char) 0200; *astate = S_META; return (0); case '^': diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 9746f2cfb73..6aedc44de26 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: usleep.c,v 1.3 1996/08/19 08:27:19 tholo Exp $"; +static char rcsid[] = "$OpenBSD: usleep.c,v 1.4 1996/09/15 09:31:11 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/time.h> @@ -41,6 +41,7 @@ static char rcsid[] = "$OpenBSD: usleep.c,v 1.3 1996/08/19 08:27:19 tholo Exp $" #define TICK 10000 /* system clock resolution in microseconds */ +static void sleephandler __P((int)); static volatile int ringring; void @@ -50,7 +51,6 @@ usleep(useconds) struct itimerval itv, oitv; struct sigaction act, oact; sigset_t set, oset; - static void sleephandler(); if (!useconds) return; @@ -108,8 +108,10 @@ usleep(useconds) (void) setitimer(ITIMER_REAL, &oitv, NULL); } +/* ARGSUSED */ static void -sleephandler() +sleephandler(sig) + int sig; { ringring = 1; } diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index 8ad2fc74a0b..64c41686d41 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -32,7 +32,7 @@ */ #if !defined(lint) && defined(LIBC_SCCS) -static char rcsid[] = "$OpenBSD: gmon.c,v 1.6 1996/09/05 12:29:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gmon.c,v 1.7 1996/09/15 09:31:12 tholo Exp $"; #endif #include <sys/param.h> @@ -42,6 +42,7 @@ static char rcsid[] = "$OpenBSD: gmon.c,v 1.6 1996/09/05 12:29:12 deraadt Exp $" #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <fcntl.h> #include <limits.h> #include <unistd.h> diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c index a7ee9fe56c6..95fe3a8f746 100644 --- a/lib/libc/locale/setlocale.c +++ b/lib/libc/locale/setlocale.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: setlocale.c,v 1.3 1996/08/26 00:17:18 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: setlocale.c,v 1.4 1996/09/15 09:31:14 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/localedef.h> @@ -230,4 +230,5 @@ loadlocale(category) case LC_TIME: return (NULL); } + return (NULL); } diff --git a/lib/libc/md/mdXhl.c b/lib/libc/md/mdXhl.c index e75bf048fdc..c8724b0fa32 100644 --- a/lib/libc/md/mdXhl.c +++ b/lib/libc/md/mdXhl.c @@ -8,7 +8,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.2 1996/08/19 08:28:30 tholo Exp $"; +static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.3 1996/09/15 09:31:16 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -20,6 +20,7 @@ static char rcsid[] = "$OpenBSD: mdXhl.c,v 1.2 1996/08/19 08:28:30 tholo Exp $"; #include <sys/uio.h> #include <unistd.h> +/* ARGSUSED */ char * MDXEnd(MDX_CTX *ctx, char *buf) { diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c index fe49a5a21bb..39338c2c744 100644 --- a/lib/libc/net/rcmdsh.c +++ b/lib/libc/net/rcmdsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ */ +/* $OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $ */ /* * This is an rcmd() replacement originally by @@ -6,7 +6,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $"; +static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -19,17 +19,19 @@ static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ #include <string.h> #include <pwd.h> #include <paths.h> +#include <unistd.h> /* * This is a replacement rcmd() function that uses the rsh(1) * program in place of a direct rcmd(3) function call so as to * avoid having to be root. Note that rport is ignored. */ +/* ARGSUSED */ int rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) char **ahost; - u_short rport; - char *locuser, *remuser, *cmd; + int rport; + const char *locuser, *remuser, *cmd; char *rshprog; { struct hostent *hp; @@ -109,12 +111,12 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) (void) fprintf(stderr, "rcmdsh: execlp %s failed: %s\n", rshprog, strerror(errno)); _exit(255); - } else if (cpid > 0) { + } else { /* Parent. close sp[1], return sp[0]. */ (void) close(sp[1]); /* Reap child. */ (void) wait(NULL); return(sp[0]); } - /*NOTREACHED*/ + /* NOTREACHED */ } diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c index e8fc192c512..ae6c030a1f0 100644 --- a/lib/libc/net/res_debug.c +++ b/lib/libc/net/res_debug.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: res_debug.c,v 1.3 1996/08/19 08:29:44 tholo Exp $"; +static char rcsid[] = "$OpenBSD: res_debug.c,v 1.4 1996/09/15 09:31:18 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -601,7 +601,7 @@ __p_rr(cp, msg, file) case T_UINFO: putc('\t', file); - fputs(cp, file); + fputs((char *) cp, file); cp += dlen; break; diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index cb60d4c0df1..355c9ce1b0f 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: res_init.c,v 1.6 1996/08/27 03:32:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: res_init.c,v 1.7 1996/09/15 09:31:19 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -112,8 +112,6 @@ res_init() int haveenv = 0; int havesearch = 0; int nsort = 0; - int dots; - u_long mask; _res.nsaddr.sin_len = sizeof(struct sockaddr_in); _res.nsaddr.sin_family = AF_INET; @@ -344,6 +342,7 @@ res_init() return (0); } +/* ARGSUSED */ static void res_setoptions(options, source) char *options, *source; diff --git a/lib/libc/net/res_mkquery.c b/lib/libc/net/res_mkquery.c index 90ffb9966a8..02b64e98865 100644 --- a/lib/libc/net/res_mkquery.c +++ b/lib/libc/net/res_mkquery.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.3 1996/08/19 08:29:47 tholo Exp $"; +static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.4 1996/09/15 09:31:20 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -66,6 +66,7 @@ static char rcsid[] = "$OpenBSD: res_mkquery.c,v 1.3 1996/08/19 08:29:47 tholo E * Form all types of queries. * Returns the size of the result or -1. */ +/* ARGSUSED */ int res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen) int op; /* opcode of query */ @@ -80,7 +81,9 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen) register HEADER *hp; register u_char *cp; register int n; +#ifdef ALLOW_UPDATES struct rrec *newrr = (struct rrec *) newrr_in; +#endif /* ALLOW_UPDATES */ u_char *dnptrs[10], **dpp, **lastdnptr; #ifdef DEBUG diff --git a/lib/libc/nls/_catopen.c b/lib/libc/nls/_catopen.c index 0c3afe41c49..c146156edf7 100644 --- a/lib/libc/nls/_catopen.c +++ b/lib/libc/nls/_catopen.c @@ -4,7 +4,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: _catopen.c,v 1.2 1996/08/19 08:30:03 tholo Exp $"; +static char rcsid[] = "$OpenBSD: _catopen.c,v 1.3 1996/09/15 09:31:21 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> @@ -15,11 +15,11 @@ __indr_reference(_catopen,catopen); #include <nl_types.h> -extern nl_catd _catopen __P((__const char *, int)); +extern nl_catd _catopen __P((const char *, int)); nl_catd catopen(name, oflag) - __const char *name; + const char *name; int oflag; { return _catopen(name, oflag); diff --git a/lib/libc/nls/catgets.c b/lib/libc/nls/catgets.c index 1d1f269c1f5..1763a782e10 100644 --- a/lib/libc/nls/catgets.c +++ b/lib/libc/nls/catgets.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: catgets.c,v 1.4 1996/08/19 08:30:06 tholo Exp $"; +static char rcsid[] = "$OpenBSD: catgets.c,v 1.5 1996/09/15 09:31:22 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #define _NLS_PRIVATE @@ -63,7 +63,7 @@ _catgets(catd, set_id, msg_id, s) } cat_hdr = (struct _nls_cat_hdr *) catd->__data; - set_hdr = (struct _nls_set_hdr *) (catd->__data + set_hdr = (struct _nls_set_hdr *) ((char *)catd->__data + sizeof(struct _nls_cat_hdr)); /* binary search, see knuth algorithm b */ @@ -74,7 +74,7 @@ _catgets(catd, set_id, msg_id, s) r = set_id - ntohl(set_hdr[i].__setno); if (r == 0) { - msg_hdr = (struct _nls_msg_hdr *) (catd->__data + msg_hdr = (struct _nls_msg_hdr *) ((char *)catd->__data + sizeof(struct _nls_cat_hdr) + ntohl(cat_hdr->__msg_hdr_offset)); @@ -84,10 +84,10 @@ _catgets(catd, set_id, msg_id, s) i = (l + u) / 2; r = msg_id - ntohl(msg_hdr[i].__msgno); if (r == 0) { - return (char *) (catd->__data + return (char *) catd->__data + sizeof(struct _nls_cat_hdr) + ntohl(cat_hdr->__msg_txt_offset) - + ntohl(msg_hdr[i].__offset)); + + ntohl(msg_hdr[i].__offset); } else if (r < 0) { u = i - 1; } else { diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c index 193250fc24e..ffbfda21c17 100644 --- a/lib/libc/nls/catopen.c +++ b/lib/libc/nls/catopen.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: catopen.c,v 1.7 1996/09/05 12:32:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: catopen.c,v 1.8 1996/09/15 09:31:23 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #define _NLS_PRIVATE @@ -54,8 +54,9 @@ static char rcsid[] = "$OpenBSD: catopen.c,v 1.7 1996/09/05 12:32:33 deraadt Exp #define NLS_DEFAULT_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L" #define NLS_DEFAULT_LANG "C" -static nl_catd load_msgcat(); +static nl_catd load_msgcat __P((const char *)); +/* ARGSUSED */ nl_catd _catopen(name, oflag) const char *name; @@ -141,7 +142,7 @@ load_msgcat(path) return (nl_catd) -1; } - data = mmap(0, (size_t) st.st_size, PROT_READ, MAP_SHARED, fd, 0); + data = mmap(0, (size_t) st.st_size, PROT_READ, MAP_SHARED, fd, (off_t)0); close (fd); if (data == (void *) -1) { diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index ec5713b71f7..283f66c40db 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -36,7 +36,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: regcomp.c,v 1.2 1996/08/19 08:31:10 tholo Exp $"; +static char rcsid[] = "$OpenBSD: regcomp.c,v 1.3 1996/09/15 09:31:25 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -101,9 +101,6 @@ static int freezeset __P((struct parse *p, cset *cs)); static int firstch __P((struct parse *p, cset *cs)); static int nch __P((struct parse *p, cset *cs)); static void mcadd __P((struct parse *p, cset *cs, char *cp)); -static void mcsub __P((cset *cs, char *cp)); -static int mcin __P((cset *cs, char *cp)); -static char *mcfind __P((cset *cs, char *cp)); static void mcinvert __P((struct parse *p, cset *cs)); static void mccase __P((struct parse *p, cset *cs)); static int isinsets __P((struct re_guts *g, int c)); @@ -671,7 +668,6 @@ static void p_bracket(p) register struct parse *p; { - register char c; register cset *cs = allocset(p); register int invert = 0; @@ -887,7 +883,6 @@ int endc; /* name ended by endc,']' */ register char *sp = p->next; register struct cname *cp; register int len; - register char c; while (MORE() && !SEETWO(endc, ']')) NEXT(); @@ -1263,70 +1258,13 @@ register char *cp; } /* - - mcsub - subtract a collating element from a cset - == static void mcsub(register cset *cs, register char *cp); - */ -static void -mcsub(cs, cp) -register cset *cs; -register char *cp; -{ - register char *fp = mcfind(cs, cp); - register size_t len = strlen(fp); - - assert(fp != NULL); - (void) memmove(fp, fp + len + 1, - cs->smultis - (fp + len + 1 - cs->multis)); - cs->smultis -= len; - - if (cs->smultis == 0) { - free(cs->multis); - cs->multis = NULL; - return; - } - - cs->multis = realloc(cs->multis, cs->smultis); - assert(cs->multis != NULL); -} - -/* - - mcin - is a collating element in a cset? - == static int mcin(register cset *cs, register char *cp); - */ -static int -mcin(cs, cp) -register cset *cs; -register char *cp; -{ - return(mcfind(cs, cp) != NULL); -} - -/* - - mcfind - find a collating element in a cset - == static char *mcfind(register cset *cs, register char *cp); - */ -static char * -mcfind(cs, cp) -register cset *cs; -register char *cp; -{ - register char *p; - - if (cs->multis == NULL) - return(NULL); - for (p = cs->multis; *p != '\0'; p += strlen(p) + 1) - if (strcmp(cp, p) == 0) - return(p); - return(NULL); -} - -/* - mcinvert - invert the list of collating elements in a cset == static void mcinvert(register struct parse *p, register cset *cs); * * This would have to know the set of possibilities. Implementation * is deferred. */ +/* ARGSUSED */ static void mcinvert(p, cs) register struct parse *p; @@ -1342,6 +1280,7 @@ register cset *cs; * This would have to know the set of possibilities. Implementation * is deferred. */ +/* ARGSUSED */ static void mccase(p, cs) register struct parse *p; diff --git a/lib/libc/regex/regerror.c b/lib/libc/regex/regerror.c index f34622c1823..3394ec3eb21 100644 --- a/lib/libc/regex/regerror.c +++ b/lib/libc/regex/regerror.c @@ -36,7 +36,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: regerror.c,v 1.2 1996/08/19 08:31:11 tholo Exp $"; +static char rcsid[] = "$OpenBSD: regerror.c,v 1.3 1996/09/15 09:31:26 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -164,8 +164,6 @@ const regex_t *preg; char *localbuf; { register struct rerr *r; - register size_t siz; - register char *p; for (r = rerrs; r->code != 0; r++) if (strcmp(r->name, preg->re_endp) == 0) diff --git a/lib/libc/regex/regexec.c b/lib/libc/regex/regexec.c index ea90a618170..da4545f67b0 100644 --- a/lib/libc/regex/regexec.c +++ b/lib/libc/regex/regexec.c @@ -36,7 +36,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: regexec.c,v 1.3 1996/08/19 08:31:15 tholo Exp $"; +static char rcsid[] = "$OpenBSD: regexec.c,v 1.4 1996/09/15 09:31:27 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -57,8 +57,6 @@ static char rcsid[] = "$OpenBSD: regexec.c,v 1.3 1996/08/19 08:31:15 tholo Exp $ #include "utils.h" #include "regex2.h" -static int nope = 0; /* for use in asserts; shuts lint up */ - /* macros for manipulating states, small version */ #define states long #define states1 states /* for later use in regexec() decision */ diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c index a9f92373853..74f66c184cb 100644 --- a/lib/libc/rpc/auth_unix.c +++ b/lib/libc/rpc/auth_unix.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: auth_unix.c,v 1.4 1996/08/19 08:31:21 tholo Exp $"; +static char *rcsid = "$OpenBSD: auth_unix.c,v 1.5 1996/09/15 09:31:29 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -188,7 +188,7 @@ authunix_create_default() /* * authunix operations */ - +/* ARGSUSED */ static void authunix_nextverf(auth) AUTH *auth; diff --git a/lib/libc/rpc/bindresvport.c b/lib/libc/rpc/bindresvport.c index ae3b7883209..003de2778cf 100644 --- a/lib/libc/rpc/bindresvport.c +++ b/lib/libc/rpc/bindresvport.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: bindresvport.c,v 1.8 1996/08/19 08:31:24 tholo Exp $"; +static char *rcsid = "$OpenBSD: bindresvport.c,v 1.9 1996/09/15 09:31:30 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -57,8 +57,8 @@ bindresvport(sd, sin) if (sin == (struct sockaddr_in *)0) { sin = &myaddr; - memset(sin, 0, sizeof(*sin)); - sin->sin_len = sizeof(*sin); + memset(sin, 0, sinlen); + sin->sin_len = sinlen; sin->sin_family = AF_INET; } else if (sin->sin_family != AF_INET) { errno = EPFNOSUPPORT; @@ -79,7 +79,7 @@ bindresvport(sd, sin) return(error); } - error = bind(sd, (struct sockaddr *)sin, sizeof(*sin)); + error = bind(sd, (struct sockaddr *)sin, sinlen); if (sin->sin_port == 0) { int saved_errno = errno; @@ -92,8 +92,6 @@ bindresvport(sd, sin) } if (sin != &myaddr) { - int sinlen = sizeof(*sin); - /* Hmm, what did the kernel assign... */ if (getsockname(sd, (struct sockaddr *)sin, &sinlen) < 0) diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 59628a6fa09..59e304a4e64 100644 --- a/lib/libc/rpc/clnt_perror.c +++ b/lib/libc/rpc/clnt_perror.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.3 1996/08/19 08:31:26 tholo Exp $"; +static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.4 1996/09/15 09:31:31 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -67,7 +67,6 @@ clnt_sperror(rpch, s) char *s; { struct rpc_err e; - void clnt_perrno(); char *err; char *str = _buf(); char *strstart = str; @@ -181,8 +180,6 @@ char * clnt_sperrno(stat) enum clnt_stat stat; { - int i; - unsigned int errnum = stat; if (errnum < (sizeof(rpc_errlist)/sizeof(rpc_errlist[0]))) diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c index a9215c86f74..9c3a75135df 100644 --- a/lib/libc/rpc/clnt_raw.c +++ b/lib/libc/rpc/clnt_raw.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.3 1996/08/19 08:31:27 tholo Exp $"; +static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.4 1996/09/15 09:31:32 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -122,6 +122,7 @@ clntraw_create(prog, vers) return (client); } +/* ARGSUSED */ static enum clnt_stat clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout) CLIENT *h; @@ -202,7 +203,7 @@ clntraw_geterr() { } - +/* ARGSUSED */ static bool_t clntraw_freeres(cl, xdr_res, res_ptr) CLIENT *cl; diff --git a/lib/libc/rpc/clnt_simple.c b/lib/libc/rpc/clnt_simple.c index 291711b1cd1..ba63543c183 100644 --- a/lib/libc/rpc/clnt_simple.c +++ b/lib/libc/rpc/clnt_simple.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.3 1996/08/19 08:31:28 tholo Exp $"; +static char *rcsid = "$OpenBSD: clnt_simple.c,v 1.4 1996/09/15 09:31:33 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -54,6 +54,7 @@ static struct callrpc_private { callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) char *host; + int prognum, versnum, procnum; xdrproc_t inproc, outproc; char *in, *out; { diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c index a67673edd0e..a2239061dcf 100644 --- a/lib/libc/rpc/clnt_tcp.c +++ b/lib/libc/rpc/clnt_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.8 1996/09/02 05:01:09 deraadt Exp $"; +static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.9 1996/09/15 09:31:34 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -443,7 +443,7 @@ readtcp(ct, buf, len) free(fds); return (-1); case -1: - if (errno == EINTR); + if (errno == EINTR) continue; ct->ct_error.re_status = RPC_CANTRECV; ct->ct_error.re_errno = save_errno; diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c index 157ad672cca..5ba8e444dfa 100644 --- a/lib/libc/rpc/getrpcent.c +++ b/lib/libc/rpc/getrpcent.c @@ -29,7 +29,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: getrpcent.c,v 1.6 1996/09/02 05:32:50 tholo Exp $"; +static char *rcsid = "$OpenBSD: getrpcent.c,v 1.7 1996/09/15 09:31:35 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -142,8 +142,6 @@ endrpcent() struct rpcent * getrpcent() { - struct rpcent *hp; - int reason; register struct rpcdata *d = _rpcdata(); if (d == 0) diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c index 0aa6faeb6b5..34020b9beaa 100644 --- a/lib/libc/rpc/pmap_rmt.c +++ b/lib/libc/rpc/pmap_rmt.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.9 1996/09/02 05:01:14 deraadt Exp $"; +static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.10 1996/09/15 09:31:37 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -45,6 +45,7 @@ static char *rcsid = "$OpenBSD: pmap_rmt.c,v 1.9 1996/09/02 05:01:14 deraadt Exp #include <rpc/pmap_rmt.h> #include <sys/socket.h> #include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index cce02dbbf3a..b7604d5ae97 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc.c,v 1.7 1996/08/20 23:47:43 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc.c,v 1.8 1996/09/15 09:31:38 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -422,7 +422,7 @@ svc_getreqset2(readfds, width) struct svc_req r; register SVCXPRT *xprt; register int bit; - register u_int32_t mask, *maskp; + register fd_mask mask, *maskp; register int sock; char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE]; msg.rm_call.cb_cred.oa_base = cred_area; @@ -457,7 +457,7 @@ svc_getreqset2(readfds, width) } /* now match message with a registered service*/ prog_found = FALSE; - low_vers = 0 - 1; + low_vers = (u_long) -1; high_vers = 0; for (s = svc_head; s != NULL_SVC; s = s->sc_next) { if (s->sc_prog == r.rq_prog) { diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c index cc00ef7da82..512f911399a 100644 --- a/lib/libc/rpc/svc_raw.c +++ b/lib/libc/rpc/svc_raw.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_raw.c,v 1.3 1996/08/19 08:31:54 tholo Exp $"; +static char *rcsid = "$OpenBSD: svc_raw.c,v 1.4 1996/09/15 09:31:39 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -95,6 +95,7 @@ svcraw_stat() return (XPRT_IDLE); } +/* ARGSUSED */ static bool_t svcraw_recv(xprt, msg) SVCXPRT *xprt; @@ -113,6 +114,7 @@ svcraw_recv(xprt, msg) return (TRUE); } +/* ARGSUSED */ static bool_t svcraw_reply(xprt, msg) SVCXPRT *xprt; @@ -132,6 +134,7 @@ svcraw_reply(xprt, msg) return (TRUE); } +/* ARGSUSED */ static bool_t svcraw_getargs(xprt, xdr_args, args_ptr) SVCXPRT *xprt; @@ -145,6 +148,7 @@ svcraw_getargs(xprt, xdr_args, args_ptr) return ((*xdr_args)(&srp->xdr_stream, args_ptr)); } +/* ARGSUSED */ static bool_t svcraw_freeargs(xprt, xdr_args, args_ptr) SVCXPRT *xprt; diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c index 6923dae5c9e..0a8596c782d 100644 --- a/lib/libc/rpc/svc_run.c +++ b/lib/libc/rpc/svc_run.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_run.c,v 1.7 1996/08/20 23:47:44 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_run.c,v 1.8 1996/09/15 09:31:40 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -38,6 +38,7 @@ static char *rcsid = "$OpenBSD: svc_run.c,v 1.7 1996/08/20 23:47:44 deraadt Exp #include <rpc/rpc.h> #include <sys/errno.h> #include <unistd.h> +#include <stdlib.h> extern int __svc_fdsetsize; extern fd_set *__svc_fdset; diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c index 57a336c3e68..c81043586d8 100644 --- a/lib/libc/rpc/svc_simple.c +++ b/lib/libc/rpc/svc_simple.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_simple.c,v 1.3 1996/08/19 08:31:56 tholo Exp $"; +static char *rcsid = "$OpenBSD: svc_simple.c,v 1.4 1996/09/15 09:31:41 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -57,6 +57,7 @@ static SVCXPRT *transp; struct proglst *pl; registerrpc(prognum, versnum, procnum, progname, inproc, outproc) + int prognum, versnum, procnum; char *(*progname)(); xdrproc_t inproc, outproc; { diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c index c5fdfe0793b..1b3da18094b 100644 --- a/lib/libc/rpc/svc_udp.c +++ b/lib/libc/rpc/svc_udp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_udp.c,v 1.3 1996/08/19 08:31:59 tholo Exp $"; +static char *rcsid = "$OpenBSD: svc_udp.c,v 1.4 1996/09/15 09:31:42 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -56,6 +56,8 @@ static enum xprt_stat svcudp_stat(); static bool_t svcudp_getargs(); static bool_t svcudp_freeargs(); static void svcudp_destroy(); +static void cache_set __P((SVCXPRT *, u_long)); +static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *)); static struct xp_ops svcudp_op = { svcudp_recv, @@ -157,6 +159,7 @@ svcudp_create(sock) return(svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE)); } +/* ARGSUSED */ static enum xprt_stat svcudp_stat(xprt) SVCXPRT *xprt; @@ -175,7 +178,6 @@ svcudp_recv(xprt, msg) register int rlen; char *reply; u_long replylen; - static int cache_get(); again: xprt->xp_addrlen = sizeof(struct sockaddr_in); @@ -209,7 +211,6 @@ svcudp_reply(xprt, msg) register XDR *xdrs = &(su->su_xdrs); register int slen; register bool_t stat = FALSE; - static void cache_set(); xdrs->x_op = XDR_ENCODE; XDR_SETPOS(xdrs, 0); diff --git a/lib/libc/rpc/xdr_mem.c b/lib/libc/rpc/xdr_mem.c index 66e5d0432a2..cb848cab079 100644 --- a/lib/libc/rpc/xdr_mem.c +++ b/lib/libc/rpc/xdr_mem.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.4 1996/08/19 08:32:04 tholo Exp $"; +static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.5 1996/09/15 09:31:43 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -230,6 +230,7 @@ xdrmem_inline_aligned(xdrs, len) return (buf); } +/* ARGSUSED */ static int32_t * xdrmem_inline_unaligned(xdrs, len) register XDR *xdrs; diff --git a/lib/libc/rpc/xdr_stdio.c b/lib/libc/rpc/xdr_stdio.c index e4aa8779921..c34ec63a349 100644 --- a/lib/libc/rpc/xdr_stdio.c +++ b/lib/libc/rpc/xdr_stdio.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.3 1996/08/19 08:32:08 tholo Exp $"; +static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.4 1996/09/15 09:31:44 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -97,7 +97,7 @@ xdrstdio_destroy(xdrs) { (void)fflush((FILE *)xdrs->x_private); /* xx should we close the file ?? */ -}; +} static bool_t xdrstdio_getlong(xdrs, lp) @@ -167,6 +167,7 @@ xdrstdio_setpos(xdrs, pos) FALSE : TRUE); } +/* ARGSUSED */ static int32_t * xdrstdio_inline(xdrs, len) XDR *xdrs; diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index de8ad51984b..9531179e137 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.2 1996/08/19 08:33:12 tholo Exp $"; +static char rcsid[] = "$OpenBSD: vfscanf.c,v 1.3 1996/09/15 09:31:46 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -354,7 +354,7 @@ literal: case CT_CCL: /* scan a (nonempty) character class (sets NOSKIP) */ if (width == 0) - width = ~0; /* `infinity' */ + width = (size_t)~0; /* `infinity' */ /* take only those things in the class */ if (flags & SUPPRESS) { n = 0; @@ -395,7 +395,7 @@ literal: case CT_STRING: /* like CCL, but zero-length string OK, & no NOSKIP */ if (width == 0) - width = ~0; + width = (size_t)~0; if (flags & SUPPRESS) { n = 0; while (!isspace(*fp->_p)) { diff --git a/lib/libc/stdio/vsscanf.c b/lib/libc/stdio/vsscanf.c index 3b9e70d2dcd..a9b227048e6 100644 --- a/lib/libc/stdio/vsscanf.c +++ b/lib/libc/stdio/vsscanf.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vsscanf.c,v 1.2 1996/08/19 08:33:15 tholo Exp $"; +static char rcsid[] = "$OpenBSD: vsscanf.c,v 1.3 1996/09/15 09:31:47 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -57,7 +57,6 @@ vsscanf(str, fmt, ap) const char *fmt; _BSD_VA_LIST_ ap; { - int ret; FILE f; f._flags = __SRD; diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index bdae6f00a32..54a802b0c95 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -8,7 +8,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: malloc.c,v 1.10 1996/09/11 03:04:43 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: malloc.c,v 1.11 1996/09/15 09:31:49 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -813,7 +813,7 @@ malloc_bytes(size) ; /* Find that bit, and tweak it */ - k = ffs(*lp) - 1; + k = ffs((unsigned)*lp) - 1; *lp ^= 1<<k; /* If there are no more free, remove from free-list */ diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c index 8c73cd238b4..0a1015ad9dd 100644 --- a/lib/libc/stdlib/merge.c +++ b/lib/libc/stdlib/merge.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: merge.c,v 1.2 1996/08/19 08:33:38 tholo Exp $"; +static char *rcsid = "$OpenBSD: merge.c,v 1.3 1996/09/15 09:31:50 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -147,7 +147,7 @@ mergesort(base, nmemb, size, cmp) sense = 0; } if (!big) { /* here i = 0 */ -LINEAR: while ((b += size) < t && cmp(q, b) >sense) + while ((b += size) < t && cmp(q, b) >sense) if (++i == 6) { big = 1; goto EXPONENTIAL; @@ -168,7 +168,7 @@ EXPONENTIAL: for (i = size; ; i <<= 1) goto FASTCASE; } else b = p; -SLOWCASE: while (t > b+size) { + while (t > b+size) { i = (((t - b) / size) >> 1) * size; if ((*cmp)(q, p = b + i) <= sense) t = p; diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c index de7cc3cf440..46b67b5ec76 100644 --- a/lib/libc/stdlib/random.c +++ b/lib/libc/stdlib/random.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: random.c,v 1.3 1996/08/19 08:33:46 tholo Exp $"; +static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -193,13 +193,12 @@ srandom(x) u_int x; { register long int test; - register int i, j; + register int i; ldiv_t val; if (rand_type == TYPE_0) state[0] = x; else { - j = 1; state[0] = x; for (i = 1; i < rand_deg; i++) { /* diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index 91f98888af0..3e1b047393f 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: system.c,v 1.2 1996/08/19 08:33:54 tholo Exp $"; +static char *rcsid = "$OpenBSD: system.c,v 1.3 1996/09/15 09:31:52 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -52,11 +52,13 @@ system(command) sig_t intsave, quitsave; int omask; int pstat; - char *argp[] = {"sh", "-c", (char *) command, NULL}; + char *argp[] = {"sh", "-c", NULL, NULL}; if (!command) /* just checking... */ return(1); + argp[2] = (char *)command; + omask = sigblock(sigmask(SIGCHLD)); switch(pid = vfork()) { case -1: /* error */ diff --git a/lib/libc/string/__strerror.c b/lib/libc/string/__strerror.c index c27cb8492b7..619bebf2291 100644 --- a/lib/libc/string/__strerror.c +++ b/lib/libc/string/__strerror.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: __strerror.c,v 1.3 1996/08/19 08:33:55 tholo Exp $"; +static char *rcsid = "$OpenBSD: __strerror.c,v 1.4 1996/09/15 09:31:53 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #ifdef NLS @@ -64,7 +64,7 @@ __strerror(num, buf) register unsigned int errnum; #ifdef NLS - nl_catd catd ; + nl_catd catd; catd = catopen("libc", 0); #endif diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c index ce340991730..98dad353574 100644 --- a/lib/libc/sys/ftruncate.c +++ b/lib/libc/sys/ftruncate.c @@ -32,12 +32,16 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.4 1996/08/19 08:34:31 tholo Exp $"; +static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.5 1996/09/15 09:31:54 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <sys/syscall.h> +#ifdef lint +quad_t __syscall(quad_t, ...); +#endif + /* * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. diff --git a/lib/libc/sys/mmap.c b/lib/libc/sys/mmap.c index af82cfc638f..d872a99e64a 100644 --- a/lib/libc/sys/mmap.c +++ b/lib/libc/sys/mmap.c @@ -32,13 +32,17 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mmap.c,v 1.4 1996/08/19 08:34:31 tholo Exp $"; +static char rcsid[] = "$OpenBSD: mmap.c,v 1.5 1996/09/15 09:31:55 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <sys/mman.h> #include <sys/syscall.h> +#ifdef lint +quad_t __syscall(quad_t, ...); +#endif + /* * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. diff --git a/lib/libc/sys/protolib.c b/lib/libc/sys/protolib.c index 7f61c1e10a5..b58089c55f2 100644 --- a/lib/libc/sys/protolib.c +++ b/lib/libc/sys/protolib.c @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: protolib.c,v 1.2 1996/08/19 08:34:32 tholo Exp $"; +static char rcsid[] = "$OpenBSD: protolib.c,v 1.3 1996/09/15 09:31:56 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -49,6 +49,7 @@ static char rcsid[] = "$OpenBSD: protolib.c,v 1.2 1996/08/19 08:34:32 tholo Exp #include <sys/shm.h> #include <sys/socket.h> #include <sys/stat.h> +#include <sys/timex.h> #include <sys/wait.h> #include <dirent.h> #include <fcntl.h> @@ -58,6 +59,8 @@ static char rcsid[] = "$OpenBSD: protolib.c,v 1.2 1996/08/19 08:34:32 tholo Exp #include "protolib.h" +struct blockinfo; + /* * Don't include anything after protolib.h, * both LINTLIBRARY and PROTOLIB1 are active. diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c index a7683f7fd1e..7315b9ef7e7 100644 --- a/lib/libc/sys/truncate.c +++ b/lib/libc/sys/truncate.c @@ -32,12 +32,16 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: truncate.c,v 1.4 1996/08/19 08:34:33 tholo Exp $"; +static char rcsid[] = "$OpenBSD: truncate.c,v 1.5 1996/09/15 09:31:57 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <sys/syscall.h> +#ifdef lint +quad_t __syscall(quad_t, ...); +#endif + /* * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. diff --git a/lib/libc/termios/tcsendbreak.c b/lib/libc/termios/tcsendbreak.c index 99c58bf3c7f..636dd445e7e 100644 --- a/lib/libc/termios/tcsendbreak.c +++ b/lib/libc/termios/tcsendbreak.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.2 1996/08/19 08:34:41 tholo Exp $"; +static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.3 1996/09/15 09:31:58 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -46,6 +46,7 @@ static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.2 1996/08/19 08:34:41 tholo E #include <termios.h> #include <unistd.h> +/* ARGSUSED */ int tcsendbreak(fd, len) int fd, len; diff --git a/lib/libc/yp/ypinternal.h b/lib/libc/yp/ypinternal.h index 82f7a5dc314..8e89ed28935 100644 --- a/lib/libc/yp/ypinternal.h +++ b/lib/libc/yp/ypinternal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ypinternal.h,v 1.1 1996/04/24 12:56:29 deraadt Exp $ */ +/* $OpenBSD: ypinternal.h,v 1.2 1996/09/15 09:32:00 tholo Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com> @@ -48,7 +48,6 @@ struct dom_binding { #define BINDINGDIR "/var/yp/binding" #define YPBINDLOCK "/var/run/ypbind.lock" -#define YPMATCHCACHE int (*ypresp_allfn) __P((u_long, char *, int, char *, int, void *)); void *ypresp_data; @@ -58,6 +57,7 @@ extern char _yp_domain[MAXHOSTNAMELEN]; extern int _yplib_timeout; void _yp_unbind __P((struct dom_binding *)); +int _yp_check __P((char **)); #ifdef YPMATCHCACHE diff --git a/lib/libc/yp/ypmatch_cache.c b/lib/libc/yp/ypmatch_cache.c index c7abac885fb..4f1b8f0f9ee 100644 --- a/lib/libc/yp/ypmatch_cache.c +++ b/lib/libc/yp/ypmatch_cache.c @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.4 1996/08/19 08:35:12 tholo Exp $"; +static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.5 1996/09/15 09:32:01 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -47,6 +47,7 @@ static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.4 1996/08/19 08:35:12 tholo #include <rpc/xdr.h> #include <rpcsvc/yp.h> #include <rpcsvc/ypclnt.h> +#define YPMATCHCACHE #include "ypinternal.h" int _yplib_cache = 5; |