Print this page
12257 resync smatch to 0.6.1-rc1-il-4
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/sm_locking4.c
+++ new/usr/src/tools/smatch/src/validation/sm_locking4.c
1 1 void _spin_lock(int name);
2 2 void _spin_unlock(int name);
3 3
4 4 void frob(void){}
5 5 int a;
6 6 int b;
7 7 void func (void)
8 8 {
9 9 int mylock = 1;
10 10 int mylock2 = 2;
11 11
12 12 if (1)
13 13 _spin_unlock(mylock);
14 14 frob();
15 15 if (a)
16 16 return;
17 17 if (!0)
18 18 _spin_lock(mylock);
19 19 if (0)
20 20 _spin_unlock(mylock);
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
21 21 if (b)
22 22 return;
23 23 if (!1)
24 24 _spin_lock(mylock);
25 25 }
26 26 /*
27 27 * check-name: Smatch locking #4
28 28 * check-command: smatch --project=kernel sm_locking4.c
29 29 *
30 30 * check-output-start
31 -sm_locking4.c:23 func() warn: inconsistent returns 'spin_lock:mylock'.
32 - Locked on: line 22
33 - line 23
34 - Unlocked on: line 16
31 +sm_locking4.c:23 func() warn: inconsistent returns 'mylock'.
32 + Locked on : 22-23
33 + Unlocked on: 16
35 34 * check-output-end
36 35 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX