static analysis of C/C++ code
Go to file
Daniel Marjamäki f3a96109eb check npp472 instead of npp41 2008-01-11 07:30:56 +00:00
internaltesting Tokenize: Simplify declarations 2007-05-29 06:24:36 +00:00
testUninitVar1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun3 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun4 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun5 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testbufferoverrun6 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass4 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass7 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass8 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass10 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass12 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass13 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testclass14 remove false positives (uninitialized class members) 2007-10-29 08:20:07 +00:00
testcond1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testdangerousfunc1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testdelete1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testfunc2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testfunc3 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testfunc4 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testfunc6 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testh1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testh2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testh3 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testh5 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testh6 CheckHeaders: Check if all included headers are needed 2007-06-08 16:46:06 +00:00
testif1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testif2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testif3 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testif4 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testif5 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemcheck1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemcheck2 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemcheck3 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemcheck4 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemcheck5 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
testmemset1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
teststdfunc1 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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 check npp472 instead of npp41 2008-01-11 07:30:56 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +00:00
readme.txt Minor update: Updated the readme and checkproj files. 2007-07-26 06:16:29 +00:00
testall Added 'testall' which is a simple bash-script that runs all tests 2008-01-05 16:53:51 +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 check for uninitialized variables - less generic to increase accuracy 2008-01-10 19:01:16 +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)