]> andersk Git - splint.git/blame - test/unreachable.c
noexpand always false.
[splint.git] / test / unreachable.c
CommitLineData
885824d3 1/*@exits@*/ void f (void)
2{
3 int x = 3;
4
5 exit(x);
6 x++; /* 1. Unreachable code */
7}
8
9void tu(int y)
10{
11 int x = 16;
12
13 if (x == y)
14 {
15 return;
16 }
17 else
18 {
19 x++;
20 f();
21 return; /* 2. Unreachable code */
22 }
23
24 y++; /* 3. Unreachable code: no longer reported because of previous error. */
25}
26
27int s(int z)
28{
29 switch (z)
30 {
31 case 1: return 3;
32 case 2: return 12;
33 case 3: z++; return z; z--; /* 4. Unreachable code */
34 case 4: /* 5. Fall through case */
35 switch (z + 1)
36 {
37 case 1: return 18;
38 case 2: z++;
39 }
40 return z;
41 default:
42 return 12;
43 }
44
45 z++; /* 6. Unreachable code */
46}
47
48
This page took 0.079565 seconds and 5 git commands to generate.