File: functions.c

package info (click to toggle)
cppcheck 1.86-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 14,600 kB
  • sloc: cpp: 169,157; python: 6,329; ansic: 3,848; xml: 847; makefile: 563; sh: 429; cs: 291
file content (22 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

int TestData[100];


void par_not_dependant(int par) {
  TestData[par] = 0; // BUG
}
void par_dependant(int x, int y) {
  if (x < 10)
      TestData[y] = 0; // BUG
}
void call(int x) {
  par_not_dependant(1000);
  par_dependant(0, 1000);
}

int getLargeIndex() { return 1000; }
void return_value() {
  TestData[getLargeIndex()] = 0; // BUG
}