xref: /illumos-gate/usr/src/tools/smatch/src/validation/linear/missing-return3.c (revision b531f6d16eb39863e7bbc34773fb7ef7a282a0a2)
1 static int foo(int a)
2 {
3 	if (a)
4 		return;
5 }
6 
7 static void ref(void)
8 {
9 }
10 
11 /*
12  * check-name: missing-return3
13  * check-command: sparse -vir -flinearize=last $file
14  *
15  * check-error-start
16 linear/missing-return3.c:4:17: error: return with no return value
17  * check-error-end
18  */
19