diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-11-23 18:21:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-11-23 18:21:45 +0000 |
commit | bba04305e92227febae714b170b764fd97d8ba1c (patch) | |
tree | c03b8daaed3c69dae866eb8faa7455daaeaf5da2 /usr.bin | |
parent | c2ed044382261c5793f8cfe05bfec6ce8c1c9b0e (diff) |
adjust some default options (mostly, that lint always print full paths
in errors/warnings, so that compiling in dirs controlled by .PATH'd
Makefiles gives useful errors
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xlint/lint1/main1.c | 10 | ||||
-rw-r--r-- | usr.bin/xlint/lint2/main2.c | 6 | ||||
-rw-r--r-- | usr.bin/xlint/xlint/xlint.c | 9 |
3 files changed, 12 insertions, 13 deletions
diff --git a/usr.bin/xlint/lint1/main1.c b/usr.bin/xlint/lint1/main1.c index 3d0a73ef57b..163f11ea19d 100644 --- a/usr.bin/xlint/lint1/main1.c +++ b/usr.bin/xlint/lint1/main1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main1.c,v 1.5 2005/11/20 17:42:49 deraadt Exp $ */ +/* $OpenBSD: main1.c,v 1.6 2005/11/23 18:21:43 deraadt Exp $ */ /* $NetBSD: main1.c,v 1.3 1995/10/02 17:29:56 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: main1.c,v 1.5 2005/11/20 17:42:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main1.c,v 1.6 2005/11/23 18:21:43 deraadt Exp $"; #endif #include <stdio.h> @@ -67,7 +67,7 @@ int dflag; int eflag; /* Print complete pathnames, not only the basename. */ -int Fflag; +int Fflag = 1; /* Enable some extensions of gcc */ int gflag; @@ -103,7 +103,7 @@ int uflag = 1; int vflag = 1; /* Complain about structures which are never defined. */ -int zflag = 1; +int zflag = 0; static void usage(void); @@ -146,8 +146,10 @@ main(int argc, char *argv[]) /* initialize output */ outopen(argv[1]); +#if YYDEBUG if (yflag) yydebug = 1; +#endif initmem(); initdecl(); diff --git a/usr.bin/xlint/lint2/main2.c b/usr.bin/xlint/lint2/main2.c index 08d19a1ec66..20e272d1b5e 100644 --- a/usr.bin/xlint/lint2/main2.c +++ b/usr.bin/xlint/lint2/main2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main2.c,v 1.7 2005/11/20 17:42:50 deraadt Exp $ */ +/* $OpenBSD: main2.c,v 1.8 2005/11/23 18:21:44 deraadt Exp $ */ /* $NetBSD: main2.c,v 1.2 1995/07/03 21:24:53 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: main2.c,v 1.7 2005/11/20 17:42:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main2.c,v 1.8 2005/11/23 18:21:44 deraadt Exp $"; #endif #include <stdio.h> @@ -75,7 +75,7 @@ int Hflag; int hflag; /* Print full path names, not only the last component */ -int Fflag; +int Fflag = 1; /* * List of libraries (from -l flag). These libraries are read after all diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index d14b4b42f24..de1c7afb52d 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xlint.c,v 1.20 2005/11/23 08:31:28 deraadt Exp $ */ +/* $OpenBSD: xlint.c,v 1.21 2005/11/23 18:21:44 deraadt Exp $ */ /* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: xlint.c,v 1.20 2005/11/23 08:31:28 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: xlint.c,v 1.21 2005/11/23 18:21:44 deraadt Exp $"; #endif #include <sys/param.h> @@ -93,7 +93,7 @@ static char **libs; static char **libsrchpath; /* flags */ -static int iflag, oflag, Cflag, sflag, tflag, Fflag; +static int iflag, oflag, Cflag, sflag, tflag, Fflag = 1; /* print the commands executed to run the stages of compilation */ static int Vflag; @@ -530,9 +530,6 @@ fname(const char *name, int last) return; } - if (!iflag || !first || !last) - (void)printf("%s:\n", Fflag ? name : bn); - /* build the name of the output file of lint1 */ if (oflag) { ofn = outputfn; |