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
hooks: add a warning to detect unimplemented hooks
[smatch.git]
/
validation
/
missing-return.c
blob
b6ee75efd67164dcbe0bcc55cea9d41ba1ff3457
1
int
foo
(
int
a
)
2
{
3
}
4
5
int
bar
(
int
a
)
6
{
7
if
(
a
)
8
return
0
;
9
}
10
11
/*
12
* check-name: missing return
13
* check-command: sparse -Wno-decl $file
14
* check-known-to-fail
15
*
16
* check-error-start
17
missing-return.c:3:1: warning: control reaches end of non-void function
18
missing-return.c:9:1: warning: control reaches end of non-void function
19
* check-error-end
20
*/