]> andersk Git - splint.git/blame - test/break.c
noexpand always false.
[splint.git] / test / break.c
CommitLineData
885824d3 1void f (int x)
2{
3 while (x < 3) /* 3 [5]. Suspected infinite loop: no condition values modified */
4 {
5 switch (x)
6 {
7 case 1:
8 /*@switchbreak@*/
9 break;
10 case 2:
11 /*@loopbreak@*/ /* 1. Break preceded by loopbreak is breaking a switch */
12 break;
13 case 3:
14 break; /* 2. Break statement in switch inside loop */
15 }
16
17 while (x > 2) /* 2 [4]. Suspected infinite loop: no condition values modified */
18 {
19 if (3 > 4)
20 {
21 break; /* 3. Break statement in nested loop */
22 }
23 else
24 {
25 /*@innerbreak@*/
26 break;
27 }
28 }
29 }
30
31 while (x < 2)
32 {
33 x++;
34 /*@innerbreak@*/ break; /* 4 [6]. Break preceded by innerbreak is not in a deep loop */
35 }
36}
37
38
39
40
41
42
43
44
45
46
47
48
This page took 0.128058 seconds and 5 git commands to generate.