From 875f2de7fd309eed6096e2f51415aa3ea3666f27 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 22 May 2019 20:59:05 +0300 Subject: Add --lint=no-ext to disable "xxx is a gawk extension" warnings. --- awkgram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'awkgram.c') diff --git a/awkgram.c b/awkgram.c index 150cfdc9..3d9bbf33 100644 --- a/awkgram.c +++ b/awkgram.c @@ -6873,7 +6873,7 @@ retry: } if (do_lint) { - if ((tokentab[mid].flags & GAWKX) != 0 && (warntab[mid] & GAWKX) == 0) { + if (do_lint_extensions && (tokentab[mid].flags & GAWKX) != 0 && (warntab[mid] & GAWKX) == 0) { lintwarn(_("`%s' is a gawk extension"), tokentab[mid].operator); warntab[mid] |= GAWKX; @@ -7196,7 +7196,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) (void) mk_rexp(arg); if (nexp == 3) { /* 3rd argument there */ - if (do_lint && ! warned) { + if (do_lint_extensions && ! warned) { warned = true; lintwarn(_("match: third argument is a gawk extension")); } @@ -7253,7 +7253,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) } else if (r->builtin == do_close) { static bool warned = false; if (nexp == 2) { - if (do_lint && ! warned) { + if (do_lint_extensions && ! warned) { warned = true; lintwarn(_("close: second argument is a gawk extension")); } -- cgit v1.2.3