Commit Graph

2006 Commits

Author SHA1 Message Date
Daniel Marjamäki d1d9c9a9c9 CheckMemoryLeakInClass: Only show the memory leak message when --all is used 2009-06-20 14:17:56 +02:00
Daniel Marjamäki 453a5cdd47 Fixed ticket #411 (false positive: resource leak in while loop) 2009-06-20 13:58:30 +02:00
Daniel Marjamäki 13b8f10906 refactoring testcases for Tokenizer::simplifyAddBraces 2009-06-20 13:20:51 +02:00
Kimmo Varis af994d23e1 Doxygen fixes. Wrong parameter names etc. 2009-06-20 12:54:49 +03:00
Daniel Marjamäki 03944f1b96 Tokenizer: Fixed problem when simplifying casts 2009-06-19 19:25:56 +02:00
Reijo Tomperi 5f7d88b36c Fix ticket #416 (False positive: Redundant code)
http://sourceforge.net/apps/trac/cppcheck/ticket/416
2009-06-19 19:03:09 +03:00
Daniel Marjamäki 6e1281ec34 Preprocessor: Better handling of macros that has parantheses but not parameters such as "#define AAA( ) aaa" 2009-06-19 16:42:47 +02:00
Reijo Tomperi 73661dbd69 astyle fix 2009-06-19 16:47:40 +03:00
Daniel Marjamäki 58c7414ce0 Fixed ticket #417 (Crashes in windows because of invalid char value)
negative char values are allowed in strings and comments. but not in other code.
2009-06-19 15:43:46 +02:00
Kimmo Varis f523b118ab Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-19 15:20:00 +03:00
Kimmo Varis 923e01af3f Build testrunner to same folders than cppcheck binary. 2009-06-19 15:19:32 +03:00
Daniel Marjamäki 12c9f09780 Fixed #420 (WarningOldStylePointerCast() needs a test case) 2009-06-19 12:01:27 +02:00
Kimmo Varis 3da3c74f6f Revert "Fix ticket #417 (Crashes in Windows because of invalid char value)"
This reverts commit 70db2562f4.

See the ticket - the fix was not correct fix.
2009-06-19 10:20:15 +03:00
Kimmo Varis 1619b6cb0f Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-19 00:11:17 +03:00
Daniel Marjamäki d5d96d2535 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-18 23:10:16 +02:00
Kimmo Varis 48ac595ae0 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-19 00:09:37 +03:00
Daniel Marjamäki 12f3ac5a2f Preprocessor: better handling of "..." and "__VA_ARGS__" in macros 2009-06-18 23:09:11 +02:00
Kimmo Varis 70db2562f4 Fix ticket #417 (Crashes in Windows because of invalid char value)
8-bit characters and UTF-8 characters are now converted to spaces. They can only appear in the code files in comments or string/char constants. So we cannot just ignore them as that would change length.
2009-06-19 00:09:05 +03:00
Reijo Tomperi e8d1905e6d Fix ticket #418 (delete a,b; not tokenized correctly)
http://sourceforge.net/apps/trac/cppcheck/ticket/418
2009-06-19 00:00:16 +03:00
Reijo Tomperi b7171c3cd2 Fix ticket #413 (false positive: C-style pointer casting for pure virtual function)
http://sourceforge.net/apps/trac/cppcheck/ticket/413
2009-06-18 23:26:21 +03:00
Reijo Tomperi ffd8008081 Encoding changed from ISO* to UTF-8 2009-06-18 21:21:18 +03:00
Reijo Tomperi c28cd3f82e astyle fix 2009-06-18 21:05:42 +03:00
Slava Semushin fafc261611 Fixed ticket #278 (variable id: references are not handled correctly)
http://sourceforge.net/apps/trac/cppcheck/ticket/278
2009-06-18 23:30:04 +07:00
Kimmo Varis 269e823c63 GUI: Use native file selection dialog to select viewer application.
In Windows use *.exe filter since almost all executable applications have that extension so it makes no sense to show all files.
2009-06-18 00:54:39 +03:00
Kimmo Varis a19c9861da GUI: Use native file selection dialog when selecting report file. 2009-06-18 00:34:22 +03:00
Daniel Marjamäki 5d0d21d668 Fixed a false positive (memory leak)
This false positive was first discovered in the VLC sourcecode. The TestMemoryLeakInFunction::simple11 test case is a simplified test code of that code.
2009-06-17 21:42:49 +02:00
Kimmo Varis 071c79c5cb GUI: Use native dialogs in Windows for check file/directory selection. 2009-06-17 22:35:24 +03:00
Reijo Tomperi f8b3a57682 Fix ticket #309 (false positive::is not assigned a value in 'A::operator=')
http://sourceforge.net/apps/trac/cppcheck/ticket/309
2009-06-17 00:58:16 +03:00
Daniel Marjamäki b7c9a4ed8c Created a new class for detecting leaks (forgetting to free struct members) 2009-06-16 22:01:04 +02:00
Daniel Marjamäki ed98f1b367 Fixed #131 (Regression: leak reported by 1.27 is not reported by 1.29)
The leak will be reported as a definite bug again. Not just a possible bug.
cppcheck don't know if the execution path is possible, but it knows that if the execution path is taken the memory leak will be certain.
2009-06-16 19:05:05 +02:00
Daniel Marjamäki a81b6487bf Improved the "CheckMemoryLeak::functionReturnType" 2009-06-15 21:13:39 +02:00
Reijo Tomperi 0c059af3cb getXMLFooter() and getXMLHeader() functions added and taken into use 2009-06-15 21:36:39 +03:00
Daniel Marjamäki 433ff048a4 Fixed #264 (Memory Leak: alloc by assigning to a return value)
The fix was inspired by the previous patch submitted by hoangtuansu
2009-06-15 17:44:59 +02:00
Kimmo Varis 195880807e GUI: Refactor menu and toolbar creation to own methods. 2009-06-15 00:48:16 +03:00
Reijo Tomperi 7c4423889c Fixed ticket #405 (#ifdef A and #if defined A should be handled as same configuration)
http://sourceforge.net/apps/trac/cppcheck/ticket/405
2009-06-14 23:37:18 +03:00
Reijo Tomperi 0966a2fbd4 astyle fix 2009-06-14 23:22:19 +03:00
Slava Semushin 8c327f82b3 Fixed ticket #346 (adding a "const" token prevents detection of memory leak)
http://sourceforge.net/apps/trac/cppcheck/ticket/346
2009-06-15 00:32:34 +07:00
Vesa Pikki 3b73fc6494 Made License and Authors dialogs a bit bigger. 2009-06-14 19:24:00 +03:00
Daniel Marjamäki af7c63155e Fixed #387 (Templates: template functions that return a pointer are not simplified correctly)
* Fixed so that the tokenizer handle variable declarations better when the variable is assigned the return value of a template function
 * Fixed so that the simplifyTemplates detect that a template function is used when its return value is taken
2009-06-14 14:57:47 +02:00
Kimmo Varis 7bbdc8382a GUI: Add new context menu items to copy filename/full path to clipboard. 2009-06-14 15:09:52 +03:00
Kimmo Varis 34a4c78b5c Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-14 12:59:31 +03:00
Kimmo Varis 801a241e0b GUI: Show authors list and license in simple text file view dialog.
Add "Authors" and "License" items to the Help-menu. When selected, these items open simple text file viewer dialog. The AUTHORS and COPYING files are embedded to the executable and shown in the dialog.
2009-06-14 12:57:43 +03:00
Daniel Marjamäki c56c913635 Merge branch 'master' of git@github.com:danmar/cppcheck 2009-06-14 11:30:22 +02:00
Daniel Marjamäki be52e573f3 Fixed ticket #387 (Templates: template functions that return a pointer are not simplified correctly) 2009-06-14 11:28:25 +02:00
Slava Semushin 4286fdbabb Token: introduce str(const std::string &) method.
Get rid of useless std::string.c_str() calls.

No functional change.
2009-06-14 13:55:23 +07:00
Slava Semushin bc32d04efa Replace tok->previous()->previous() call to tok->tokAt(-2).
Done by command:
git grep -l 'previous()->previous()' | xargs sed -i 's|previous()->previous()|tokAt(-2)|'

No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin 57f1a6d2b7 Replace tok->previous()->previous()->previous() call to tok->tokAt(-3).
Done by command:
git grep -l 'previous()->previous()->previous()' |
xargs sed -i 's|previous()->previous()->previous()|tokAt(-3)|'

No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin 4245047674 Replace tok->next()->next() call to tok->tokAt(2).
Done by command:
git grep -l 'next()->next()' | xargs sed -i 's|next()->next()|tokAt(2)|'

No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin ab0a1973e8 Replace tok->next()->next()->next() call to tok->tokAt(3).
Done by command:
git grep -l 'next()->next()->next(),' | xargs sed -i 's|next()->next()->next()|tokAt(3)|'

No functional change.
2009-06-14 13:33:44 +07:00
Slava Semushin b3841dda96 Replace tok->next()->next()->next()->next() call to tok->tokAt(4).
Done by command:
git grep -l 'next()->next()->next()->next(),' | xargs sed -i 's|next()->next()->next()->next()|tokAt(4)|'

No functional change.
2009-06-14 13:33:44 +07:00