static analysis of C/C++ code
Go to file
Daniel Marjamäki c5580b8464 CheckClass: Treating all "std::*" as initialized. 2007-10-23 06:37:13 +00:00
internaltesting Tokenize: Simplify declarations 2007-05-29 06:24:36 +00:00
testbufferoverrun1 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun2 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun3 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun4 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun5 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun6 Updated the tests 2007-06-08 18:32:23 +00:00
testbufferoverrun7 Improved the buffer overrun checks. Results that are not 100% certain must be enabled through the "-w". 2007-07-19 06:21:01 +00:00
testclass1 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass2 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass4 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass7 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass8 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass10 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testclass12 Testing: Renamed 'warnclass12' to 'testclass12' 2007-05-18 18:24:13 +00:00
testclass13 Command line options: Added "--all" and "--style", removed "-w" 2007-07-20 15:43:39 +00:00
testcond1 TestCond1: Updated test. It didn't have a "err.msg" file 2007-07-26 06:16:01 +00:00
testdangerousfunc1 Updated the tests 2007-06-08 18:32:23 +00:00
testdelete1 Updated the tests 2007-06-08 18:32:23 +00:00
testfunc2 Updated the tests 2007-06-08 18:32:23 +00:00
testfunc3 Updated the tests 2007-06-08 18:32:23 +00:00
testfunc4 Updated the tests 2007-06-08 18:32:23 +00:00
testfunc6 Updated the tests 2007-06-08 18:32:23 +00:00
testh1 Updated the tests 2007-06-08 18:32:23 +00:00
testh2 Tests: Updated the tests. Checking for unneeded includes 2007-06-04 06:36:08 +00:00
testh3 Updated the tests 2007-06-08 18:32:23 +00:00
testh5 Testing: Added warning messages. 2007-05-21 17:16:35 +00:00
testh6 CheckHeaders: Check if all included headers are needed 2007-06-08 16:46:06 +00:00
testif1 Updated the tests 2007-06-08 18:32:23 +00:00
testif2 Updated the tests 2007-06-08 18:32:23 +00:00
testif3 Updated the tests 2007-06-08 18:32:23 +00:00
testif4 Updated the tests 2007-06-08 18:32:23 +00:00
testif5 CheckOther: Added check. 'if (condition) var=true; else var=false;' => 'var = (condition);' 2007-06-08 18:19:15 +00:00
testmemcheck1 Updated the tests 2007-06-08 18:32:23 +00:00
testmemcheck2 Updated the tests 2007-06-08 18:32:23 +00:00
testmemcheck3 Updated the tests 2007-06-08 18:32:23 +00:00
testmemcheck4 Updated the tests 2007-06-08 18:32:23 +00:00
testmemcheck5 Updated the tests 2007-06-08 18:32:23 +00:00
testmemleak1 CheckMemoryLeak: Detect memory leaks for class members 2007-06-10 18:25:39 +00:00
testmemleak2 Added 2 checks for memory leaks 2007-07-27 08:11:07 +00:00
testmemleak3 Removing false positives 2007-08-31 04:23:09 +00:00
testmemleak4 Removing false positives 2007-08-31 04:23:09 +00:00
testmemset1 Updated the tests 2007-06-08 18:32:23 +00:00
teststdfunc1 Tests: Modified the test 'teststdfunc1'. Warnings has been deactivated. 2007-05-18 18:27:04 +00:00
CheckBufferOverrun.cpp Command line options: Added "--all" and "--style", removed "-w" 2007-07-20 15:43:39 +00:00
CheckBufferOverrun.h CheckBufferOverrun: Added 'CheckDangerousFunctions' 2007-05-25 06:44:53 +00:00
CheckClass.cpp CheckClass: Treating all "std::*" as initialized. 2007-10-23 06:37:13 +00:00
CheckClass.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
CheckHeaders.cpp Minor updates to make it portable to Linux. 2007-07-17 06:15:50 +00:00
CheckHeaders.h CheckHeaders: Added files (Check for mistakes in headers or related to headers) 2007-05-24 13:08:18 +00:00
CheckMemoryLeak.cpp Removing false positives 2007-08-31 04:23:09 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Added files (Check for memory leaks) 2007-05-24 13:08:51 +00:00
CheckOther.cpp Removing false positives 2007-08-31 04:23:09 +00:00
CheckOther.h Added checks: 2007-07-24 06:23:28 +00:00
CommonCheck.cpp For the highest accuracy, don't warn for all memory leaks unless the "-w" is given 2007-07-20 06:20:31 +00:00
CommonCheck.h For the highest accuracy, don't warn for all memory leaks unless the "-w" is given 2007-07-20 06:20:31 +00:00
Makefile Minor modifications to make it compile on linux 2007-07-18 06:37:37 +00:00
Statements.cpp Added 2 checks for memory leaks 2007-07-27 08:11:07 +00:00
Statements.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
TestTok.cpp minor updates 2007-05-29 17:12:14 +00:00
bufferoverrun.txt bufferoverrun.txt: Added file that contains thoughts and ideas concerning buffer overruns. 2007-07-20 06:21:40 +00:00
checknpp.bat Command line options: Added "--all" and "--style", removed "-w" 2007-07-20 15:43:39 +00:00
checkproj.bat Minor update: Updated the readme and checkproj files. 2007-07-26 06:16:29 +00:00
cppcheck.bpf Files needed to build with Borland C++ Builder 2007-05-08 15:21:24 +00:00
cppcheck.bpr Minor updates to make it portable to Linux. 2007-07-17 06:15:50 +00:00
cppcheck.res Files needed to build with Borland C++ Builder 2007-05-08 15:21:24 +00:00
internaltesting.bat Building Statement List: CONTINUE, BREAK 2007-05-19 17:01:42 +00:00
main.cpp disabled checks that generates false positives 2007-10-22 06:59:28 +00:00
readme.txt Minor update: Updated the readme and checkproj files. 2007-07-26 06:16:29 +00:00
tok.bpf tok: Added a program that tests the tokenizer. 2007-05-26 06:45:00 +00:00
tok.bpr minor updates 2007-05-29 17:12:14 +00:00
tok.res tok: Added a program that tests the tokenizer. 2007-05-26 06:45:00 +00:00
tokenize.cpp tokenizer: removed some preprocessing => less false positives 2007-10-23 06:36:29 +00:00
tokenize.h tokenizer: made the 'SizeOfType' public. bug fix in the tokenizer (strings longer than 1000 characters). 2007-05-30 20:08:05 +00:00
updateall.bat Updated the tests 2007-06-08 18:32:23 +00:00

readme.txt


=========
C++ check
=========



Compiling

  Any C++ compiler should work. 
  There are no dependencies.

  The Makefile works under Linux.
  To make it work under Windows, change "g++" to "gxx".

  I haven't been able to test it on other platforms.



Usage

  The syntax is:
      cppcheck [--all] [--style] filename.cpp

  The error messages will be printed to stderr.




Recommendations

  Create a shell script that checks all files.
  See "checkproj.bat" for an example of how it can be done under Windows.

  When the "--all" flag is given you may get a lot of error messages.

  To dump the messages to a textfile you can use a command like this:
      cppcheck --all filename.cpp 2> messages.txt

  If you want to filter the messages you could use:
    * grep to filter out specific types of messages
    * diff to compare old messages with new messages. There are even GUIs for
      this.



Suggestions

  I'd like to get suggestions about new checks.



Author

  Daniel Marjamäki   (danielm77@spray.se)