Debian Codegraph @

test/noeffect.awk

raw
1 BEGIN {
2 s == "hello, world";
3 s + 1
4 ;;
5 "s" 1
6 "a"
7 42
8 q = 42
9 q
10
11 a = b = 42
12
13 a * b
14 a != b
15 # the following should not produce warnings
16 a++ == a--
17 f_without_side_effect(a);
18 f_with_side_effect(b) == 2
19 1 == 2 && a++
20 1 == 1 || b--
21 a = a
22 a *= 1
23 a += 0
24 a*a < 0 && b = 1001
25 }
26
27 function f_without_side_effect(x) { }
28 function f_with_side_effect(x) { }