"Fossies" - the Fresh Open Source Software Archive

Member "cppcheck-1.89/test/synthetic/functions.c" (1 Sep 2019, 345 Bytes) of package /windows/misc/cppcheck-1.89.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 int TestData[100];
    3 
    4 
    5 void par_not_dependant(int par) {
    6   TestData[par] = 0; // BUG
    7 }
    8 void par_dependant(int x, int y) {
    9   if (x < 10)
   10       TestData[y] = 0; // BUG
   11 }
   12 void call(int x) {
   13   par_not_dependant(1000);
   14   par_dependant(0, 1000);
   15 }
   16 
   17 int getLargeIndex() { return 1000; }
   18 void return_value() {
   19   TestData[getLargeIndex()] = 0; // BUG
   20 }
   21 
   22