Commit Graph

10070 Commits

Author SHA1 Message Date
Reijo Tomperi aa579911ab Refactoring: Global variable tokenes is no more. 2008-11-16 15:58:52 +00:00
Reijo Tomperi 231e753289 Refactoring: static variable in CheckMemoryLeak is now a private member of the class. 2008-11-16 15:39:42 +00:00
Reijo Tomperi ce08224547 Few static variables are now private members. ShowAll etc. global variables are now members of Settings class and given as a
parameter to the classes that need them.
2008-11-16 15:18:50 +00:00
Daniel Marjamäki 2ecb805283 Memory leak: Mismatching allocation and deallocation in subfunction 2008-11-16 13:55:16 +00:00
Daniel Marjamäki 8dab130d3e Memory leak: Added a simple test case 2008-11-16 07:33:28 +00:00
Daniel Marjamäki d5d2f0671c Memory leak: reverted most of change 461. 2008-11-16 06:34:22 +00:00
Daniel Marjamäki d11e93f475 Memory leak: Added test case that failed. And fixed it. 2008-11-16 05:57:41 +00:00
Reijo Tomperi 0a638a57d0 Bug fix: Missing include from previous commit, didn't compile on Debian. 2008-11-15 22:54:39 +00:00
Reijo Tomperi 08b25dc0d4 Refactoring: Global/Static variables, FunctionList, GlobalFunctions and UsedGlobalFunctions are now private members of Tokenizer class.
Class GlobalFunction is now private subclass of Tokenizer. 
Global functions CheckGlobalFunctionUsage, FillFunctionList and GetFunctionTokenByName are now member functions of Tokenizer.
2008-11-15 22:41:56 +00:00
Daniel Marjamäki 2cbfa6b60b Memory Leak: Handling Linux lists better => Detect more leaks 2008-11-15 18:24:40 +00:00
Daniel Marjamäki 43dcf6efd6 codeblocks: Added project file 'testrunner.cbp' 2008-11-15 18:03:59 +00:00
Daniel Marjamäki adad786d75 SimplifyTokens: Replace 'sizeof(*abc)' with '100'. This prevents false positives in checks 2008-11-15 17:21:35 +00:00
Daniel Marjamäki 1801f25bce Simplify Tokens: Replace NULL with 0 and '(char *)0' with '0' 2008-11-15 16:27:09 +00:00
Daniel Marjamäki 8c9c6529b8 Uninitialized Member Variables: Fixed bug 'false positive on multi constructors' 2008-11-15 15:22:10 +00:00
Daniel Marjamäki add2283724 cleanup files 2008-11-15 13:05:58 +00:00
Daniel Marjamäki 9034c8b27e Uninitialized member variable: Added unit test that currently fails for bug 2270353 - Uninitialized variable false positive on multi constructors 2008-11-15 08:53:51 +00:00
Daniel Marjamäki 607036d4eb Visual C++ Express 2008: Added project 'testrunner' and updated the project 'cppcheck' 2008-11-15 07:15:01 +00:00
Daniel Marjamäki 9454bee161 Borland C++: Added files "cppcheck" and "settings" to the projects 2008-11-15 07:01:07 +00:00
Daniel Marjamäki da52dfe948 Applied patch "errors_only_man" that adds description for "--errorsonly" to the man page. This was submitted by kimmov in bug 2277848 2008-11-15 06:44:32 +00:00
Reijo Tomperi 403017de99 Refactoring: New classes CppCheck and Settings. Code from main.cpp was moved to cppcheck.cpp 2008-11-14 22:26:38 +00:00
Reijo Tomperi 1efb4c95a6 Refactoring: Global variable Files is no more. Use tokenizer->getFiles() to get a pointer to it. 2008-11-13 22:39:47 +00:00
Reijo Tomperi 1c9bf8cabd Make: New improved makefile 2008-11-13 20:48:25 +00:00
Daniel Marjamäki 4995c5d4c6 Uninitialized variable: chained assignments 2008-11-13 18:16:36 +00:00
Daniel Marjamäki 34507f73ce Added command line option "--errorsonly" 2008-11-13 17:43:55 +00:00
Reijo Tomperi 0b1ee10353 Refactoring: tokens_back and TypeSize are no longer global variables 2008-11-12 22:50:40 +00:00
Reijo Tomperi 134985e410 Refactoring: Tokenizer object given as a parameter to most of the classes 2008-11-12 21:34:47 +00:00
Daniel Marjamäki 58f0f03449 Unused private function: return pointer to private function 2008-11-11 20:19:28 +00:00
Daniel Marjamäki 0c910c9775 Memory leak: Added TODO test. Mismatching allocation and deallocation in subfunction 2008-11-11 20:03:06 +00:00
Daniel Marjamäki 57c144a342 unused private function: Added test1 (assert that error message is given for simple case) 2008-11-11 20:02:10 +00:00
Daniel Marjamäki f347efd802 Memory leak: Fixed one more unit test 2008-11-11 19:46:08 +00:00
Daniel Marjamäki 3a39259472 Refactoring: Don't use the TOKEN::str directly 2008-11-11 17:46:53 +00:00
Daniel Marjamäki d8f11d3142 Refactoring: Use 'Match' instead of direct comparisons 2008-11-11 17:22:40 +00:00
Reijo Tomperi f242c4fddd Refactoring: Following new classes were created:
CheckBufferOverrunClass
CheckClass
CheckHeaders
CheckMemoryLeakClass
CheckOther
Preprocessor
2008-11-11 06:42:09 +00:00
Daniel Marjamäki f752b0e375 unused struct member: Added checks 2008-11-10 20:59:18 +00:00
Daniel Marjamäki 607a4337ec testmemleak: Added todo 'forwhile7' 2008-11-10 20:30:47 +00:00
Daniel Marjamäki 90635eced7 Memory leak: Handle "goto" a little differently 2008-11-10 20:18:03 +00:00
Daniel Marjamäki 0ea17838cf cleanup 2008-11-10 18:56:02 +00:00
Daniel Marjamäki f50c36c84f todo: added memory leak examples 2008-11-10 18:52:15 +00:00
Daniel Marjamäki f4712ef5bf Memory leaks: Added tests and handling for 'throw' and linux lists 2008-11-10 18:51:44 +00:00
Daniel Marjamäki 61db3a7f11 todo: added 'check operator=' 2008-11-10 07:50:58 +00:00
Daniel Marjamäki b347ba5a7e Memory leak: Minor updates in the notvar function 2008-11-09 17:47:00 +00:00
Daniel Marjamäki fd7ce880aa Memory Leak: Improved checking of subfunctions. Simplify their code. 2008-11-09 17:36:53 +00:00
Daniel Marjamäki 2c74d1c0de Memory leak: Ensure that simple memory leak is detected 2008-11-09 17:27:23 +00:00
Daniel Marjamäki 8fce5d39e5 Memory leak: Began work for parsing into subfunctions. 2008-11-09 16:34:18 +00:00
Daniel Marjamäki 26bfab1c7e Memory leak: Removed false positives. 'use ; use ;' is not always the same as 'use ;' 2008-11-09 10:09:42 +00:00
Daniel Marjamäki c2ea705fd7 Memory Leak: Stronger checking. Ignore 'if use ;' and 'if dealloc;'. A leak could occur if it's not executed. 2008-11-09 08:40:57 +00:00
Reijo Tomperi ef9f472188 Refactoring: Tokenizer class added, functions still mostly static and
using globals
2008-11-09 07:19:53 +00:00
Daniel Marjamäki e9a6f223e6 GPL: Added comment in testsuite.h 2008-11-08 13:15:48 +00:00
Daniel Marjamäki 15e9f4ae25 Unused private function: Added test 2008-11-08 13:14:16 +00:00
Daniel Marjamäki 224b241f9a Memory leak: remove the dealloc in "if dealloc ;" if it's not followed
by an "else". This makes the checking stronger.
2008-11-08 07:19:19 +00:00