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