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
check_signed: check int types as well
[smatch.git]
/
validation
/
sm_dev_hold.c
blob
201a78c39eae32517fefad6fe0480ee9ad04d4d5
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(10) warn: 'x' held on error path.
27
* check-output-end
28
*/