diff options
author | gavin <gavin@FreeBSD.org> | 2010-06-28 12:04:55 +0000 |
---|---|---|
committer | gavin <gavin@FreeBSD.org> | 2010-06-28 12:04:55 +0000 |
commit | 27450f928887021c02a2b656ffc2d6ae0c43737b (patch) | |
tree | d1cce6095506f37863ffa73807ca3e0a9fb18a86 /usr.bin/locate/code/locate.code.c | |
parent | b1c566e1ce4d8cc7ebf01274e6cbc4f7816a5c33 (diff) | |
download | FreeBSD-src-27450f928887021c02a2b656ffc2d6ae0c43737b.zip FreeBSD-src-27450f928887021c02a2b656ffc2d6ae0c43737b.tar.gz |
Various changes to make locate compilable with WARNS=6. Note that there
is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents
actually bumping this to WARNS=6 - I'm still considering the correct
solution to this issue.
Tested by: make universe
Diffstat (limited to 'usr.bin/locate/code/locate.code.c')
-rw-r--r-- | usr.bin/locate/code/locate.code.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/locate/code/locate.code.c b/usr.bin/locate/code/locate.code.c index 6290c67..9a87c16 100644 --- a/usr.bin/locate/code/locate.code.c +++ b/usr.bin/locate/code/locate.code.c @@ -37,6 +37,7 @@ * $FreeBSD$ */ +#if 0 #ifndef lint static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ @@ -46,6 +47,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "@(#)locate.code.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ +#endif /* * PURPOSE: sorted list compressor (works with a modified 'find' @@ -122,14 +124,12 @@ int bgindex(char *); void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { - register u_char *cp, *oldpath, *path; + u_char *cp, *oldpath, *path; int ch, code, count, diffcount, oldcount; + u_int i, j; FILE *fp; - register int i, j; while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { @@ -256,10 +256,9 @@ main(argc, argv) #ifndef LOOKUP int -bgindex(bg) /* Return location of bg in bigrams or -1. */ - char *bg; +bgindex(char *bg) /* Return location of bg in bigrams or -1. */ { - register char bg0, bg1, *p; + char bg0, bg1, *p; bg0 = bg[0]; bg1 = bg[1]; @@ -271,7 +270,7 @@ bgindex(bg) /* Return location of bg in bigrams or -1. */ #endif /* !LOOKUP */ void -usage() +usage(void) { (void)fprintf(stderr, "usage: locate.code common_bigrams < list > squozen_list\n"); |