cppcheck/test/synthetic/functions.c

23 lines
383 B
C
Raw Normal View History

2016-11-02 11:07:04 +01:00
int TestData[100];
2016-11-03 20:16:49 +01:00
void test_function_par1(int par) {
2016-11-02 11:07:04 +01:00
TestData[par] = 0;
}
void test_function_par2(int x, int y) {
if (x < 123)
TestData[y] = 0;
}
void call(int x) {
test_function_par1(1000);
test_function_par2(x, x < 1000 ? 10 : 1000);
}
int getLargeIndex() { return 1000; }
void test_function_return() {
TestData[getLargeIndex()] = 0;
}