diff options
author | markm <markm@FreeBSD.org> | 2001-12-11 23:10:26 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-12-11 23:10:26 +0000 |
commit | c5cd5cd15638a4863a7d984e53cc1d94f243d5a3 (patch) | |
tree | 8cf01c89037da6c5693e4c5372a3d61836f184a9 /usr.bin/vgrind | |
parent | 7df3906a00167bbe45ed05a9feaa3166f79ceda1 (diff) | |
download | FreeBSD-src-c5cd5cd15638a4863a7d984e53cc1d94f243d5a3.zip FreeBSD-src-c5cd5cd15638a4863a7d984e53cc1d94f243d5a3.tar.gz |
WARNS=2 fix, kill register keyword, use __FBSDID().
NO_WERROR set because of hard-to-fix warnings originating in
system headers.
Diffstat (limited to 'usr.bin/vgrind')
-rw-r--r-- | usr.bin/vgrind/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/vgrind/extern.h | 3 | ||||
-rw-r--r-- | usr.bin/vgrind/regexp.c | 13 | ||||
-rw-r--r-- | usr.bin/vgrind/vfontedpr.c | 24 | ||||
-rw-r--r-- | usr.bin/vgrind/vgrindefs.c | 7 |
5 files changed, 27 insertions, 21 deletions
diff --git a/usr.bin/vgrind/Makefile b/usr.bin/vgrind/Makefile index b9911d2..6840443 100644 --- a/usr.bin/vgrind/Makefile +++ b/usr.bin/vgrind/Makefile @@ -3,6 +3,7 @@ PROG= vfontedpr SRCS= regexp.c vfontedpr.c +NO_WERROR=yes SCRIPTS=vgrind.sh MAN= vgrind.1 vgrindefs.5 diff --git a/usr.bin/vgrind/extern.h b/usr.bin/vgrind/extern.h index 946bcd5..1b05680 100644 --- a/usr.bin/vgrind/extern.h +++ b/usr.bin/vgrind/extern.h @@ -32,6 +32,7 @@ * SUCH DAMAGE. * * @(#)extern.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ typedef int boolean; @@ -53,7 +54,7 @@ extern char *l_prcbeg; /* regular expr for procedure begin */ extern char *l_strbeg; /* delimiter for string constant */ extern char *l_strend; /* delimiter for string constant */ extern boolean l_toplex; /* procedures only defined at top lex level */ -extern char *language; /* the language indicator */ +extern const char *language; /* the language indicator */ #include <sys/cdefs.h> diff --git a/usr.bin/vgrind/regexp.c b/usr.bin/vgrind/regexp.c index 476a548e..836f203 100644 --- a/usr.bin/vgrind/regexp.c +++ b/usr.bin/vgrind/regexp.c @@ -32,19 +32,24 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); + #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ +#endif #ifndef lint -static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ +static const char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93"; +#endif #include <ctype.h> #include <stdlib.h> #include <string.h> + #include "extern.h" #define FALSE 0 diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c index 09c6338..a7e06c3 100644 --- a/usr.bin/vgrind/vfontedpr.c +++ b/usr.bin/vgrind/vfontedpr.c @@ -31,19 +31,19 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); + #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ +#endif #ifndef lint -#if 0 -static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93"; +static const char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ #include <sys/types.h> #include <sys/stat.h> @@ -99,7 +99,7 @@ static boolean pass = FALSE; /* static int blklevel; /* current nesting level */ static int comtype; /* type of comment */ -static char *defsfile[2] = { _PATH_VGRINDEFS, 0 }; +static const char *defsfile[2] = { _PATH_VGRINDEFS, 0 }; /* name of language definitions file */ static int margin; static int plstack[PSMAX]; /* the procedure nesting level stack */ @@ -127,7 +127,7 @@ char *l_prcbeg; /* regular expr for procedure begin */ char *l_strbeg; /* delimiter for string constant */ char *l_strend; /* delimiter for string constant */ boolean l_toplex; /* procedures only defined at top lex level */ -char *language = "c"; /* the language indicator */ +const char *language = "c"; /* the language indicator */ #define ps(x) printf("%s", x) @@ -136,7 +136,7 @@ main(argc, argv) int argc; char *argv[]; { - char *fname = ""; + const char *fname = ""; struct stat stbuf; char buf[BUFSIZ]; char *defs; @@ -166,7 +166,7 @@ main(argc, argv) if (!strcmp(argv[0], "-f")) { filter++; argv[0] = argv[argc-1]; - argv[argc-1] = "-"; + argv[argc-1] = strdup("-"); continue; } @@ -179,7 +179,7 @@ main(argc, argv) /* build an index */ if (!strcmp(argv[0], "-x")) { idx++; - argv[0] = "-n"; + argv[0] = strdup("-n"); } /* indicate no keywords */ @@ -719,7 +719,7 @@ iskw(s) while (++cp, isidchr(*cp)) i++; - while (cp = *ss++) + while ((cp = *ss++)) if (!STRNCMP(s,cp,i) && !isidchr(cp[i])) return (i); return (0); diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c index 2839d1f..c3d7711 100644 --- a/usr.bin/vgrind/vgrindefs.c +++ b/usr.bin/vgrind/vgrindefs.c @@ -31,10 +31,9 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); #define BUFSIZ 1024 #define MAXHOP 32 /* max number of tc= indirections */ |