static analysis of C/C++ code
Go to file
Daniel Marjamäki 30e1d5c06e CheckIncompleteStatement: Fixed false positive generated by CheckIncompleteStatement (bug 2187837) 2008-10-23 17:45:24 +00:00
CheckBufferOverrun.cpp made cppcheck compile with g++ 4.3 2008-08-30 18:29:37 +00:00
CheckBufferOverrun.h CheckBufferOverrun: Added 'CheckDangerousFunctions' 2007-05-25 06:44:53 +00:00
CheckClass.cpp CheckClass: Minor fix to make it compile in Visual c++ 2008-10-21 08:47:26 +00:00
CheckClass.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
CheckHeaders.cpp made cppcheck compile with g++ 4.3 2008-08-30 18:29:37 +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 Memory Leak: Better checking of mismatching alloc and dealloc for gtk 2008-10-19 15:20:31 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Added files (Check for memory leaks) 2007-05-24 13:08:51 +00:00
CheckOther.cpp CheckIncompleteStatement: Fixed false positive generated by CheckIncompleteStatement (bug 2187837) 2008-10-23 17:45:24 +00:00
CheckOther.h Incomplete statement: Check for statements that begin with a constant 2008-09-20 17:34:37 +00:00
CommonCheck.cpp compilation: Various cross compilation fixes. The "--recursive" option doesn't work on VC now. 2008-09-11 17:03:58 +00:00
CommonCheck.h CheckMemoryLeak: Refactoring the check 2008-08-16 12:44:46 +00:00
Makefile CheckIncompleteStatement: Fixed false positive generated by CheckIncompleteStatement (bug 2187837) 2008-10-23 17:45:24 +00:00
cppcheck.cbproj cg2007: Added CodeGear 2007 project files 2008-08-07 19:15:06 +00:00
main.cpp CheckUnsignedDivision: Made it more accurate and moved it to the 2008-10-04 12:12:24 +00:00
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
testbufferoverrun.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testcharvar.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testconstructors.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testdivision.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testmemleak.cpp Memory Leak: Fixed false positive 2008-10-19 07:23:06 +00:00
testother.cpp CheckIncompleteStatement: Fixed false positive generated by CheckIncompleteStatement (bug 2187837) 2008-10-23 17:45:24 +00:00
testrunner.cbproj Testing: Updated the testing to the new test framework 2008-10-13 06:42:40 +00:00
testrunner.cpp Testing: Updated the testing to the new test framework 2008-10-13 06:42:40 +00:00
tests.cpp test: Added 'testdivision' 2008-08-23 16:40:53 +00:00
testsuite.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testsuite.h testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
testunusedvar.cpp testing: Various fixes to make the tests compile without warnings/errors 2008-10-16 17:22:26 +00:00
todo.txt todo: added todo to simplify the token list further 2008-08-09 08:35:28 +00:00
tokenize.cpp tokenize: Fixed possible endless loop problem when handling typedefs 2008-10-19 06:21:01 +00:00
tokenize.h Checking for memory leaks. Changed the handling of comments about 2008-04-12 06:33:45 +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] [--recursive] [filename1] [filename2]

  The error messages will be printed to stderr.

  Example (Check all files. Use all checks):
      cppcheck -style --all --recursive


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)