xref: /illumos-gate/usr/src/tools/smatch/src/validation/backend/int-cond.c (revision 4c87aefe8930bd07275b8dd2e96ea5f24d93a52e)
1 static long foo(long a, long b, long c)
2 {
3 	return a? b:c;
4 }
5 
6 static long foo_bool(_Bool a, long b, long c)
7 {
8 	return a? b:c;
9 }
10 
11 static long bar(long a, long b, long c)
12 {
13 	if (a)
14 		return b;
15 	else
16 		return b + c;
17 }
18 
19 static long bar_bool(_Bool a, long b, long c)
20 {
21 	if (a)
22 		return b;
23 	else
24 		return b + c;
25 }
26 
27 /*
28  * check-name: Non-bool condition values in branch/select
29  * check-command: sparsec -c $file -o tmp.o
30  */
31