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
implied_value: don't get confused by casts
[smatch.git]
/
validation
/
sm_dev_hold.c
blob
0d86ea1d8251e77ff17411addab9e29650092795
1
void
dev_hold
(
int
*
x
);
2
3
void
dev_put
(
int
*
x
){}
4
5
extern
int
y
,
z
;
6
7
int
func
(
void
)
8
{
9
int
*
x
;
10
11
dev_hold
(
x
);
12
if
(
y
) {
13
dev_put
(
x
);
14
return
-
1
;
15
}
16
if
(
z
) {
17
return
-
1
;
18
}
19
return
0
;
20
}
21
/*
22
* check-name: dev_hold() check
23
* check-command: smatch --project=kernel sm_dev_hold.c
24
*
25
* check-output-start
26
sm_dev_hold.c:17 func() warn: 'x' held on error path.
27
* check-output-end
28
*/