27 }
28
29 if (a || b) {
30 b->a = 1;
31 }
32
33 if (c) {
34 ab = 1;
35 }
36
37 if (ab) {
38 c->a = 1;
39 }
40 }
41 /*
42 * check-name: Null Dereferences
43 * check-command: smatch --spammy -I.. sm_null_deref.c
44 *
45 * check-output-start
46 sm_null_deref.c:18 func() error: potentially dereferencing uninitialized 'aa'.
47 sm_null_deref.c:23 func() error: we previously assumed 'a' could be null (see line 20)
48 sm_null_deref.c:25 func() warn: variable dereferenced before check 'a' (see line 23)
49 sm_null_deref.c:30 func() error: we previously assumed 'b' could be null (see line 25)
50 * check-output-end
51 */
52
|
27 }
28
29 if (a || b) {
30 b->a = 1;
31 }
32
33 if (c) {
34 ab = 1;
35 }
36
37 if (ab) {
38 c->a = 1;
39 }
40 }
41 /*
42 * check-name: Null Dereferences
43 * check-command: smatch --spammy -I.. sm_null_deref.c
44 *
45 * check-output-start
46 sm_null_deref.c:18 func() error: potentially dereferencing uninitialized 'aa'.
47 sm_null_deref.c:18 func() error: potentially dereferencing uninitialized 'aa'.
48 sm_null_deref.c:23 func() error: we previously assumed 'a' could be null (see line 20)
49 sm_null_deref.c:25 func() warn: variable dereferenced before check 'a' (see line 23)
50 sm_null_deref.c:30 func() error: we previously assumed 'b' could be null (see line 25)
51 * check-output-end
52 */
53
|