fill_db_untrusted: follow untrusted data down the call tree
[smatch.git] / validation / sm_precedence.c
blob31ad476a2a16210e373e371a72f729dbde7a3c2e
1 struct foo {
2 unsigned int x:1;
3 };
5 int frob();
6 int a,b,c,d, x, y;
7 struct foo *z;
8 static int options_write(void)
10 if (x & y == 0)
11 frob();
12 if (x | y == 0)
13 frob();
14 if (a == b & c == d)
15 frob();
16 if (a == c == d)
17 frob();
18 if (!a == b)
19 frob();
20 c = !a & b;
21 if (x + y == 0)
22 frob();
23 if (!a == !b)
24 frob();
25 if (!a == z->x)
26 frob();
27 if (!!a == b)
28 frob();
32 * check-name: Smatch precedence check
33 * check-command: smatch sm_precedence.c
35 * check-output-start
36 sm_precedence.c +10 options_write(2) warn: add some parenthesis here?
37 sm_precedence.c +12 options_write(4) warn: add some parenthesis here?
38 sm_precedence.c +14 options_write(6) warn: add some parenthesis here?
39 sm_precedence.c +16 options_write(8) warn: add some parenthesis here?
40 sm_precedence.c +18 options_write(10) warn: add some parenthesis here?
41 sm_precedence.c +20 options_write(12) warn: add some parenthesis here?
42 * check-output-end