"Fossies" - the Fresh Open Source Software Archive

Member "cppcheck-1.89/test/test.cxx" (1 Sep 2019, 471 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 This is testing data for the GUI.
    3 Used for testing GUI with various error styles reported by cppcheck.
    4 Not meant to be compiled.
    5 */
    6 
    7 #include <vector>
    8 
    9 void unused()
   10 {
   11     int a = 15;
   12 }
   13 
   14 void f(char k)
   15 {
   16     delete k;
   17 }
   18 
   19 void possible_style()
   20 {
   21     std::list<int>::iterator it;
   22     for (it = ab.begin(); it != ab.end(); it++)
   23         ;
   24 }
   25 
   26 int main()
   27 {
   28     char *b = new char[1];
   29     char *a = new char[8];
   30     if (a);
   31     b = gets();
   32     f(a);
   33     possible_style();
   34 }