Print this page
11506 smatch resync
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/sm_implied5.c
+++ new/usr/src/tools/smatch/src/validation/sm_implied5.c
1 1 struct ture {
2 2 int a;
3 3 };
4 4
5 5 int out_a;
6 6
7 7 void func (void)
8 8 {
9 9 struct ture *aa;
10 10 int a = 0;
11 11
12 12 if (out_a) {
13 13 aa = returns_nonnull();
14 14 a = something();
15 15 }
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 if (a)
17 17 aa->a = 1;
18 18 aa->a = 0xF00D;
19 19 }
20 20 /*
21 21 * check-name: Smatch implied #5
22 22 * check-command: smatch --spammy sm_implied5.c
23 23 *
24 24 * check-output-start
25 25 sm_implied5.c:18 func() error: potentially dereferencing uninitialized 'aa'.
26 +sm_implied5.c:18 func() error: potentially dereferencing uninitialized 'aa'.
26 27 * check-output-end
27 28 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX