Line No. |
Count No. |
Source |
1 |
|
#include "../share/share.h"
|
2 |
|
using namespace test;
|
3 |
|
|
4 |
|
#ifdef demo
|
5 |
|
// A lot of unused code to demo the 'Goto the first zero" feature
|
6 |
|
int unused_func() {
|
7 |
|
int x=0;
|
8 |
|
for (int i = 0; i < 20; ++i) {
|
9 |
|
x *= 2;
|
10 |
|
x += 1;
|
11 |
|
}
|
12 |
|
return x;
|
13 |
|
}
|
14 |
|
|
15 |
|
int unused_func1() {
|
16 |
|
int x=0;
|
17 |
|
for (int i = 0; i < 40; ++i) {
|
18 |
|
x *= 2;
|
19 |
|
x += 1;
|
20 |
|
}
|
21 |
|
return x;
|
22 |
|
}
|
23 |
|
|
24 |
|
int unused_func2() {
|
25 |
|
int x=0;
|
26 |
|
for (int i = 0; i < 60; ++i) {
|
27 |
|
x *= 2;
|
28 |
|
x += 1;
|
29 |
|
}
|
30 |
|
return x;
|
31 |
|
}
|
32 |
|
|
33 |
|
int unused_func3() {
|
34 |
|
int x=0;
|
35 |
|
for (int i = 0; i < 80; ++i) {
|
36 |
|
x *= 2;
|
37 |
|
x += 1;
|
38 |
|
}
|
39 |
|
return x;
|
40 |
|
}
|
41 |
|
|
42 |
|
int unused_func4() {
|
43 |
|
int x=0;
|
44 |
|
for (int i = 0; i < 100; ++i) {
|
45 |
|
x *= 2;
|
46 |
|
x += 1;
|
47 |
|
}
|
48 |
|
return x;
|
49 |
|
}
|
50 |
|
|
51 |
|
int unused_func5() {
|
52 |
|
int x=0;
|
53 |
|
for (int i = 0; i < 120; ++i) {
|
54 |
|
x *= 2;
|
55 |
|
x += 1;
|
56 |
|
}
|
57 |
|
return x;
|
58 |
|
}
|
59 |
|
|
60 |
|
#endif
|
61 |
|
|
62 |
1 |
int bar(int y) {
|
63 |
1 |
int x = test::foo();
|
64 |
1 |
if (y >= 100)
|
65 |
0 |
x += y / 2;
|
66 |
1 |
else
|
67 |
1 |
x += y * 2;
|
68 |
1 |
return x;
|
69 |
1 |
}
|