diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-12-19 15:56:10 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-12-19 15:56:10 +0200 |
commit | 45eced1c2512d48a392c7b9f761137d7601fa5b8 (patch) | |
tree | c05b50e929528f7f92e3d2dec63b86cf9b4e815c /awkgram.y | |
parent | 894413cf12f347facef4de3626573644d067c3bb (diff) | |
download | egawk-45eced1c2512d48a392c7b9f761137d7601fa5b8.tar.gz egawk-45eced1c2512d48a392c7b9f761137d7601fa5b8.tar.bz2 egawk-45eced1c2512d48a392c7b9f761137d7601fa5b8.zip |
Fix --disable-lint.
Diffstat (limited to 'awkgram.y')
-rw-r--r-- | awkgram.y | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -47,7 +47,9 @@ static int install_function(char *fname, INSTRUCTION *fi, INSTRUCTION *plist); static NODE *mk_rexp(INSTRUCTION *exp); static void param_sanity(INSTRUCTION *arglist); static int parms_shadow(INSTRUCTION *pc, int *shadow); +#ifndef NO_LINT static int isnoeffect(OPCODE type); +#endif static INSTRUCTION *make_assignable(INSTRUCTION *ip); static void dumpintlstr(const char *str, size_t len); static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2); @@ -4514,6 +4516,7 @@ mk_rexp(INSTRUCTION *list) return ip->memory; } +#ifndef NO_LINT /* isnoeffect --- when used as a statement, has no side effects */ static int @@ -4556,6 +4559,8 @@ isnoeffect(OPCODE type) return false; } +#endif /* NO_LINT */ + /* make_assignable --- make this operand an assignable one if posiible */ @@ -5354,8 +5359,10 @@ add_lint(INSTRUCTION *list, LINTTYPE linttype) ; if (do_lint) { /* compile-time warning */ +#ifndef NO_LINT if (isnoeffect(ip->opcode)) lintwarn_ln(ip->source_line, ("statement may have no effect")); +#endif } if (ip->opcode == Op_push) { /* run-time warning */ |