xref: /illumos-gate/usr/src/tools/smatch/src/validation/empty-expr.c (revision 73b80b821da76082173547dd650e417f6916eb8b)
1 static int foo(void)
2 {
3 	switch () {
4 	case 0:
5 		return 0;
6 	default:
7 		return 1;
8 	}
9 }
10 
11 static int bar(void)
12 {
13 	if ()
14 		return 0;
15 	else
16 		return 1;
17 }
18 
19 /*
20  * check-name: empty expression
21  *
22  * check-error-start
23 empty-expr.c:3:17: error: an expression is expected before ')'
24 empty-expr.c:13:13: error: an expression is expected before ')'
25  * check-error-end
26  */
27