repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
__module_put_and_exit() doesn't return.
[smatch.git]
/
validation
/
sm_implied4.c
blob
9e2d6147de38fd0c00d0cc2537e6e876e6d22d39
1
void
_spin_lock
(
int
name
);
2
void
_spin_unlock
(
int
name
);
3
4
void
frob
(
void
){}
5
int
a
;
6
int
b
;
7
int
c
;
8
int
func
(
void
)
9
{
10
int
mylock
=
1
;
11
int
mylock2
=
2
;
12
13
if
(!
a
)
14
_spin_lock
(
mylock
);
15
if
(
b
)
16
frob
();
17
if
(!
a
)
18
_spin_unlock
(
mylock
);
19
if
(
a
)
20
_spin_lock
(
mylock
);
21
if
(
c
)
22
return
0
;
23
if
(
a
)
24
_spin_unlock
(
mylock
);
25
return
0
;
26
}
27
28
/*
29
* check-name: Smatch implied #4
30
* check-command: smatch sm_implied4.c
31
*
32
* check-output-start
33
sm_implied4.c +22 func(14) warn: 'mylock' is sometimes locked here and sometimes unlocked.
34
* check-output-end
35
*/