From 017ea7dbc2881ae23aa55595f1d2d01e1ac008be Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 26 Oct 2003 03:34:13 +0000 Subject: [PATCH] Move the -Wtraditional warning from the global cpp flags to when the -p (portability warnings) switch is used. Add -Wno-system-headers after it so that we dont get 500 screenfulls of warnings about #elif in /usr/include. I'm not entirely happy with this. Maybe cdefs.h shouldn't use #elif and instead nest #else clauses? --- usr.bin/xlint/xlint/xlint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index 257f493d0895..9dc8df612912 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -351,8 +351,6 @@ main(int argc, char *argv[]) appdef(&cflags, "lint"); - appcstrg(&lcflags, "-Wtraditional"); - appcstrg(&deflibs, "c"); if (signal(SIGHUP, terminate) == SIG_IGN) @@ -404,6 +402,7 @@ main(int argc, char *argv[]) break; case 'p': + appcstrg(&lcflags, "-Wtraditional -Wno-system-headers"); appcstrg(&l1flags, "-p"); appcstrg(&l2flags, "-p"); if (*deflibs != NULL) {