hooks: add a warning to detect unimplemented hooks
[smatch.git] / validation / missing-return.c
blobb6ee75efd67164dcbe0bcc55cea9d41ba1ff3457
1 int foo(int a)
5 int bar(int a)
7 if (a)
8 return 0;
12 * check-name: missing return
13 * check-command: sparse -Wno-decl $file
14 * check-known-to-fail
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