Commit Graph

2352 Commits

Author SHA1 Message Date
Daniel Marjamäki c0ca375ef7 Fixed #478 (Warnings in Visual Studio build with -W4) 2009-09-13 09:03:48 +02:00
Daniel Marjamäki 1d974f7c05 memory leaks: added test assertion. simplify ';alloc;exit;' to ';exit;' 2009-09-13 07:20:42 +02:00
Reijo Tomperi 241f585d34 Fix #594 (division by zero not detected when using atol or atof)
http://sourceforge.net/apps/trac/cppcheck/ticket/594
Simplify atol("0") into 0 (and other atol() calls also)
2009-09-12 23:54:47 +03:00
Reijo Tomperi c6b0cfc15c Fix #662 (Command line option --append not documented)
http://sourceforge.net/apps/trac/cppcheck/ticket/662
2009-09-12 22:16:13 +03:00
Daniel Marjamäki 5df28c51c6 memory leaks: minor refactorings 2009-09-12 21:13:47 +02:00
Daniel Marjamäki f4b6c822d3 Fixed #375 (new check: Detect when using 'this-x') 2009-09-12 15:25:02 +02:00
Daniel Marjamäki ab4a7fdef2 Fixed #518 (False positive for leaks when function from err()-family used) 2009-09-12 14:11:17 +02:00
Daniel Marjamäki 7479b943cc Fixed #644 (Tokenizer::simplifyComma: Wrong simplification in cast) 2009-09-12 08:12:00 +02:00
Daniel Marjamäki 37dae83e06 More Fixing of #635 (Preprocessor: remove 'asm(...)') 2009-09-11 23:34:24 +02:00
Reijo Tomperi ed1c9bed49 Fix ticket #632 (Mathlib isInt() identifies "330L" as not int)
http://sourceforge.net/apps/trac/cppcheck/ticket/632
2009-09-11 23:46:59 +03:00
Daniel Marjamäki 8837e0dcff Simple fix for #635 (preprocessor: remove 'asm(...)') 2009-09-11 21:22:41 +02:00
Reijo Tomperi 9828117aff Fixed some "is passed by value" errors from cppcheck source. 2009-09-10 22:22:57 +03:00
Reijo Tomperi a6c809226e Fix #656 (Improve const-correctness)
http://sourceforge.net/apps/trac/cppcheck/ticket/656
Applied slightly modified patch from elfring
2009-09-10 00:25:58 +03:00
Reijo Tomperi 908aaff1fa New test case in TestSimplifyTokens::template_default_parameter 2009-09-09 23:57:28 +03:00
Daniel Marjamäki 48846c008d Fixed #650 ('possible style' pre-incrementing error shown without --all) 2009-09-08 21:41:11 +02:00
Daniel Marjamäki 80bf406a97 Settings: Added an 'append' command line flag that allows the user to provide extra information about functions. See ticket #260 2009-09-08 19:49:05 +02:00
Reijo Tomperi ed425158d9 astyle fix 2009-09-06 15:12:38 +03:00
Slava Semushin c1958054af Added test cases for #487. 2009-09-06 18:29:39 +07:00
Slava Semushin 572c206755 Refactoring: move code for sizeof() simplification to method.
Introduce and use Tokenizer::simplifySizeof() method.

No functional change.
2009-09-06 18:23:17 +07:00
Slava Semushin 587e96322d Tokenizer(simplifyNestedStrcat): correctly set line numbers for new tokens.
Pointed out by aggro80@ in IRC. Thanks!
2009-09-06 17:33:55 +07:00
Kimmo Varis 24cd2bdbb4 Upate QT framework's URL to readme. 2009-09-06 10:57:21 +03:00
Kimmo Varis 5e30a725d4 Move gui's readme to root directory to make it easier to find. 2009-09-06 10:54:42 +03:00
Kimmo Varis 132403168e Wrap long line in readme.txt. 2009-09-06 10:52:31 +03:00
Daniel Marjamäki 535fe17ffd Templates: Scaled up the handling of default values for template parameters (#638) 2009-09-06 08:22:45 +02:00
Reijo Tomperi 75a65a02a8 Fix another issue related to #647 (Crash during tokenizing (wrong) K&R function declaration)
http://sourceforge.net/apps/trac/cppcheck/ticket/647
2009-09-05 23:41:39 +03:00
Reijo Tomperi a3d9863725 Fix #647 (Crash during tokenizing (wrong) K&R function declaration)
http://sourceforge.net/apps/trac/cppcheck/ticket/647
Thanks to undingen for providing a patch
2009-09-05 22:21:25 +03:00
Reijo Tomperi 7af4ac4282 New command line argument added --template
Fix ticket #462 (Allow using template to customize output format)
http://sourceforge.net/apps/trac/cppcheck/ticket/462
2009-09-05 22:01:49 +03:00
Slava Semushin 195cc9aae9 Fixed #585 (Preprocessor: Don't check the same configuration twice)
http://sourceforge.net/apps/trac/cppcheck/ticket/585
2009-09-06 00:01:57 +07:00
Slava Semushin a9273c9d39 Fixed #629 (Tokenizer: expand nested strcat() calls)
http://sourceforge.net/apps/trac/cppcheck/ticket/629
2009-09-05 23:46:27 +07:00
Daniel Marjamäki d86a2505f3 Merge branch 'master' of git://github.com/AlekSi/cppcheck into aleksi 2009-09-05 11:03:53 +02:00
Aleksey Palazhchenko d9d2f53df6 Added top-level 'check' target.
Also refactored all. pro files by the way. :)
2009-09-04 22:59:25 +04:00
Daniel Marjamäki 333c6d9e0a memory leaks: Added a todo test case for the getcode function 2009-09-04 19:11:19 +02:00
Aleksey Palazhchenko e48664a3c9 Fixes in test.pro 2009-09-04 11:05:06 +04:00
Reijo Tomperi 23c07dd2b8 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-09-03 23:36:42 +03:00
Reijo Tomperi 7408674017 Fix #601 (Poor var initialization assumption when can't find function definition)
http://sourceforge.net/apps/trac/cppcheck/ticket/601
Fix #641 ((style) Member variable not initialized in the constructor: False Positive)
http://sourceforge.net/apps/trac/cppcheck/ticket/641

This fix will also cause us not to detect several potential issues, but as there are so many
false positives, any unknown function call should stop the error for now. New
ticket is created to handle regression caused by this:
http://sourceforge.net/apps/trac/cppcheck/ticket/643
2009-09-03 23:28:00 +03:00
Daniel Marjamäki 7a9e4a7bd4 templates: remove typename tokens 2009-09-03 22:19:44 +02:00
Reijo Tomperi a4190bc590 Fix ticket #642 (txx (template implementation files) not recognized/checked.)
http://sourceforge.net/apps/trac/cppcheck/ticket/642
2009-09-03 23:04:38 +03:00
Daniel Marjamäki 2719724a97 templates: Quick fix for the problem with default value for a template argument 2009-09-03 21:46:07 +02:00
Daniel Marjamäki 401f8aaa96 Templates: Added todo testcase for handling default values for template arguments. Related with ticket #638 2009-09-02 22:54:50 +02:00
Reijo Tomperi 686ff425f9 Fix ticket #637 (False positive, Using 'memset' on struct that contains a 'std::string')
http://sourceforge.net/apps/trac/cppcheck/ticket/637
2009-09-02 23:51:07 +03:00
Reijo Tomperi 7569bda227 Added few memset test cases 2009-09-02 23:32:15 +03:00
Reijo Tomperi 8ab26e85cf Don't warn about division by zero if zero if floating point number.
Fix bug from mathlib isInt() and add test case from which few are false positives
2009-09-01 22:06:46 +03:00
Daniel Marjamäki 93659bbe08 memory leaks: fixed a todo testcase to find more leaks 2009-09-01 20:12:53 +02:00
Daniel Marjamäki 9a47b7110e memory leaks: fixed todo testcases to find more memory leaks 2009-09-01 20:02:28 +02:00
Slava Semushin ca053bf8f9 CheckMemoryLeakInFunction: print simplified tokens only with --debug and --verbose.
Suggested by aggro80@ and approved by hyd_danmar@ in IRC.
2009-09-02 00:54:40 +07:00
Slava Semushin 92f436b474 Tokenizer::syntaxError(): throw exception when debug enabled.
This allows to stop test suite when first syntax error found.
2009-09-02 00:38:49 +07:00
Slava Semushin 953183d905 Print error messages to stderr (instead of stdout). 2009-09-02 00:38:43 +07:00
Slava Semushin 0ec848b1fa test/testmemleak.cpp(dofindleak): provide settings object with debug enabled.
This allows to print tokens when syntax error found in one of tests.
2009-09-02 00:38:35 +07:00
Daniel Marjamäki 7ba244cf45 Memory leaks: fixed a todo testcase 2009-09-01 19:33:17 +02:00
Daniel Marjamäki 59a4a36fe1 memory leaks: minor fix for testcase 2009-09-01 19:06:34 +02:00