diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2021-04-14 17:33:07 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2021-04-14 17:33:07 +0300 |
commit | a8f16ebdef4e43fcda9a4956e8ef528c33728047 (patch) | |
tree | 20c7b903104970098337a1f322c8b05ed2c67ece /test/noeffect.awk | |
parent | f271311ac33d44e68da147a273847c3ce8552bb8 (diff) | |
download | egawk-a8f16ebdef4e43fcda9a4956e8ef528c33728047.tar.gz egawk-a8f16ebdef4e43fcda9a4956e8ef528c33728047.tar.bz2 egawk-a8f16ebdef4e43fcda9a4956e8ef528c33728047.zip |
Fixes for lint check of no effect.
Diffstat (limited to 'test/noeffect.awk')
-rw-r--r-- | test/noeffect.awk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/noeffect.awk b/test/noeffect.awk index 4be76b1e..107ccbe5 100644 --- a/test/noeffect.awk +++ b/test/noeffect.awk @@ -7,4 +7,22 @@ BEGIN { 42 q = 42 q + + a = b = 42 + + a * b + a != b + # the following should not produce warnings + a++ == a-- + f_without_side_effect(a); + f_with_side_effect(b) == 2 + 1 == 2 && a++ + 1 == 1 || b-- + a = a + a *= 1 + a += 0 + a*a < 0 && b = 1001 } + +function f_without_side_effect(x) { } +function f_with_side_effect(x) { } |