static analysis of C/C++ code
Go to file
Daniel Marjamäki 7a07284c7e test: Added the last buffer overrun tests 2008-08-23 16:15:31 +00:00
CheckBufferOverrun.cpp buffer overruns: added tests and improved the checking 2008-08-12 06:39:41 +00:00
CheckBufferOverrun.h CheckBufferOverrun: Added 'CheckDangerousFunctions' 2007-05-25 06:44:53 +00:00
CheckClass.cpp Checking memset/memcpy/memmove. Removed false positives 2008-04-18 17:18:22 +00:00
CheckClass.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
CheckHeaders.cpp Fixing bug 1935006 - Compile problems on cygwin 2008-04-06 06:26:11 +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 CheckMemoryLeak: Updated the handling of 'case' and 'default' a little 2008-08-23 13:16:25 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Added files (Check for memory leaks) 2007-05-24 13:08:51 +00:00
CheckOther.cpp cleanup: removed spaces 2008-08-12 06:40:55 +00:00
CheckOther.h CheckOther: Removed unused functions 2008-05-14 04:30:56 +00:00
CommonCheck.cpp refactoring: made compilation work in codegear 2008-08-20 07:32:07 +00:00
CommonCheck.h CheckMemoryLeak: Refactoring the check 2008-08-16 12:44:46 +00:00
Makefile testing: Added 'testbufferoverrun' 2008-08-23 14:12:08 +00:00
MiniCppUnit.cpp minicppunit: removed compiler warnings about characters 2008-08-23 13:17:10 +00:00
MiniCppUnit.h minicppunit: removed compiler warnings about characters 2008-08-23 13:17:10 +00:00
TestsRunner.cpp testing: Started using the MiniCppUnit framework 2008-08-21 17:32:34 +00:00
cppcheck.cbproj cg2007: Added CodeGear 2007 project files 2008-08-07 19:15:06 +00:00
main.cpp CheckStructMemberUsage: Check for unused struct members 2008-05-09 18:29:42 +00:00
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
testbufferoverrun.cpp test: Added the last buffer overrun tests 2008-08-23 16:15:31 +00:00
testmemleak.cpp testing: Moved tests from tests.cpp to testmemleak.cpp (forwhile, switch) 2008-08-22 06:30:06 +00:00
testrunner.cbproj testing: created new testproject for codegear that uses the minicppunit framework 2008-08-22 06:31:23 +00:00
tests.cpp testing: Added 'testbufferoverrun' 2008-08-23 14:12:08 +00:00
todo.txt todo: added todo to simplify the token list further 2008-08-09 08:35:28 +00:00
tokenize.cpp cleanup: removed spaces 2008-08-12 06:40:55 +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)