Commit Graph

1531 Commits

Author SHA1 Message Date
Daniel Marjamäki 4c92c8e6e7 testtokenize: Added TestTokenize::match1 that makes sure the old
matching of "|" and "||" still works
2008-12-06 12:54:40 +00:00
Reijo Tomperi d307b999e0 CheckMemoryLeak.cpp, g_renew and g_try_renew also removed 2008-12-06 12:45:54 +00:00
Reijo Tomperi 0ea34d4705 Memory leak: False positive with g_realloc(). Removed g_realloc() and g_try_realloc() for now. See feature request [ 2395262 ] Check leaks with realloc, g_realloc and
g_try_realloc()
2008-12-06 11:41:08 +00:00
Reijo Tomperi 2f27bf09b8 cppcheck and executor, fixed compiling error 2008-12-06 09:27:28 +00:00
Daniel Marjamäki 6d7a0e65b3 refactoring: Increased constness of function parameters 2008-12-06 07:40:13 +00:00
Reijo Tomperi 345a7f2c9b Preprocessor: Fixed bug, read() didn't handle correctly string constants like this: "\"" 2008-12-05 22:18:13 +00:00
Reijo Tomperi a669d020cf Token: Fixed bug in match function, simplified CheckBufferOverrun code 2008-12-05 20:37:05 +00:00
Daniel Marjamäki 48dd250796 Memory leak: refactoring - changed "aaaa" to "str" 2008-12-05 19:37:11 +00:00
Daniel Marjamäki f7a846e31e tokenize: Replace a complicated condition with a "Match" 2008-12-05 19:17:25 +00:00
Daniel Marjamäki b029163cdc tokenize: Replace "aaaa" and "strcmp" with "str" and "Match" 2008-12-05 19:04:41 +00:00
Daniel Marjamäki e385bcd83b CheckHeaders: Refactoring so str and Match is used instead of aaaa and
strcmp etc
2008-12-05 18:46:05 +00:00
Daniel Marjamäki 62e363daa5 Memory leak: Replaced a few "strcmp" with "==" 2008-12-05 18:39:23 +00:00
Daniel Marjamäki 963760b59f Buffer overrun: Minor refactoring. Use the Match function better. 2008-12-05 18:35:36 +00:00
Daniel Marjamäki 09f7c07a4d tokenize: Minor refactorings 2008-12-05 18:25:08 +00:00
Daniel Marjamäki 89663bef0a CheckOther: Fixed a compiler warning 2008-12-05 18:17:51 +00:00
Reijo Tomperi a4d4305919 Bug fix: Minor bug in previous commit, test added to catch that bug also. 2008-12-04 21:52:40 +00:00
Reijo Tomperi c958482196 TOKEN: Match() function improved, %any% and const|volatile kind of patterns are now accepted. Simplified comparing on tokenize.cpp. 2008-12-04 21:48:15 +00:00
Daniel Marjamäki 3820a26e1c Tokenizer: Simplify numeric comparisons 2008-12-04 19:32:26 +00:00
Daniel Marjamäki c6ed868009 testsuite: show diffing strings better when they are not equal 2008-12-04 19:31:30 +00:00
Daniel Marjamäki e9a533fb32 TestTokenize: Use TOKEN::str() instead of TOKEN::aaaa() where possible 2008-12-04 07:35:48 +00:00
Daniel Marjamäki 5ce5c7ab63 Preprocessor: Minor refactoring and improved testing 2008-12-04 07:34:31 +00:00
Reijo Tomperi 5eb653911e Tokenizer: Fixed bug, const and volatile functions were not recogniced
by fillFunctionList()
2008-12-03 20:22:48 +00:00
Daniel Marjamäki d3a2a32a58 preprocessor: fixed handling of tabs and spaces 2008-12-03 18:35:58 +00:00
Daniel Marjamäki 17cb374ce2 Memory leaks: Various improvements in "simplifycode" 2008-12-02 18:00:58 +00:00
Daniel Marjamäki d5506618b6 Memory leak: Further improvements of "simplifycode" 2008-12-02 17:22:01 +00:00
Daniel Marjamäki 8578df698f Memory leak: Changed a comment 2008-12-02 16:58:43 +00:00
Daniel Marjamäki d5d31cc632 updated the borland project file 2008-12-02 14:38:32 +00:00
Reijo Tomperi 9b56be86c6 Minor improvement to code comments. 2008-12-01 22:33:21 +00:00
Nicolas Le Cam b886702d0d Warning If minor optimizations 2008-12-01 20:02:39 +00:00
Reijo Tomperi 19308e0ed6 Patch: [ 2371330 ] Removed CheckOther::WarningDangerousFunctions() declaration 2008-12-01 19:41:37 +00:00
Daniel Marjamäki a8bf4d7e77 Memory leak: Refactoring and improvements of simplifycode etc 2008-12-01 18:52:40 +00:00
Daniel Marjamäki bbd21613f7 testing: minor refactoring so better error messages are shown 2008-12-01 18:52:03 +00:00
Daniel Marjamäki e968b42c38 Memory leaks: When "--debug" is given the checking will be different to
highlight problems in "getcode" and "simplifycode"
2008-12-01 07:50:36 +00:00
Daniel Marjamäki 5ab22473e3 added comment about "--debug" flag. This is used for various debugging purposes so the behaviour of c++check is undefined if it's given 2008-11-30 19:32:36 +00:00
Daniel Marjamäki a7ece61734 Memory leak: The "do" must be handled differently. Made a first fix for it 2008-11-30 19:00:07 +00:00
Reijo Tomperi 5326a35951 Verbose: Added line change to help text printing and updated man page 2008-11-30 10:38:58 +00:00
Daniel Marjamäki a07c1745c3 Verbose error message output through '--verbose' 2008-11-30 09:08:07 +00:00
Daniel Marjamäki f646684159 Memory leak: Fixed the test 'CheckMemoryLeak::func8' 2008-11-29 17:34:47 +00:00
Daniel Marjamäki 8c07a13cb6 Test Memory leak: Added a test case, currently a false positive is generated 2008-11-29 16:42:14 +00:00
Daniel Marjamäki 87794cc66c cppcheck: Write version number etc 2008-11-29 13:58:28 +00:00
Daniel Marjamäki 95c7e1a7d3 Memory leak: Moved the class member checking to the "--all" 2008-11-28 17:16:28 +00:00
Daniel Marjamäki 1f189f655d Array index : No recursive checking unless the "--all" has been given 2008-11-27 20:29:29 +00:00
Reijo Tomperi df452a3b0f Recursive file listing, .cxx added to file list 2008-11-27 19:17:15 +00:00
Reijo Tomperi 101e7b96fc Removed debug output 2008-11-27 18:57:07 +00:00
Daniel Marjamäki 6fcbbf21ee Memory leaks: Reverted the sensitive checking in r536. And improved the
simplifycode function.
2008-11-27 07:27:50 +00:00
Daniel Marjamäki 997f4e6165 Memory leaks: Made the checking a lot more sensitive 2008-11-26 18:13:36 +00:00
Daniel Marjamäki 2e22c7cb1d CheckMemoryLeak: Refactoring. Use TOKEN::isStandardType instead of rewriting its functionality 2008-11-26 07:23:54 +00:00
Daniel Marjamäki b179083788 token: refactoring the 'isStandardType' a little 2008-11-26 07:22:34 +00:00
Daniel Marjamäki c95fee7266 testmemleak: Added 'func7' test case. Not working yet 2008-11-26 07:17:50 +00:00
Reijo Tomperi 69ba8ce7f9 Feature added: CppCheck class has now function addFile(string,string) which allows checking of unreal files, by giving just filename and file content as a
parameter.
2008-11-25 20:56:11 +00:00