Commit Graph

3995 Commits

Author SHA1 Message Date
PKEuS 452f95cea0 More robust template detection in clarifyCondition check based on Token::link. (#3818)
Create links between < and > only on non-C code.
AStyle fix
2012-08-02 04:03:01 -07:00
PKEuS 3b5dabdb14 Clarified errormessage of checkBoost 2012-08-02 02:40:08 -07:00
PKEuS 003a9be3ed Refactorizations: Made several test functions const according to cppcheck messages. 2012-08-02 02:13:09 -07:00
PKEuS 8594eca9cd Made several functions in testsuite.cpp const according to cppcheck suggestions 2012-08-01 11:54:55 -07:00
PKEuS 7b25c48f9f Partially reverted my last commit, since some of the tests were already commented out below. 2012-08-01 11:35:20 -07:00
PKEuS 78bc4ddbad Fixed unusedFunctions warnings emmitted by cppcheck:
- Several tests in testcmdlineparser.cpp were never executed (failing tests commented)
- Unnecessary function in testmemleak.cpp removed.
2012-08-01 11:18:03 -07:00
PKEuS 88e4794d6e Refactorized CheckClass::checkConst:
- Added checking for functions that can be even declared static (#1971. Removed fix for #1563)
- Consistent usage of Function::TokenDef to avoid problems with scope identifiers
- Rewrote parsing of function body making it more generic
- Removed three redundant tests
2012-08-01 10:24:38 -07:00
Ettl Martin 98d608231d spelling fixes 2012-07-31 23:35:56 +02:00
Ville Skyttä dce16a970d spelling fixes 2012-07-31 21:28:42 +02:00
Daniel Marjamäki 435340b463 Fixed #3814 (false positive: missing constructor) 2012-07-29 16:01:05 +02:00
PKEuS 26a2379f9f Fixed false positive #3941. 2012-07-29 06:39:43 -07:00
PKEuS 1ec3c9f634 Fixed hang in libreoffice code (simplification of K&R style function declaration tried to simplify a function with parameters without name whose implementation contained "; {".
Test cases of this simplification only need basic simplifications done in Tokenizer::tokenize
2012-07-29 06:11:48 -07:00
PKEuS 6aa7f984cb Fixed false positives on FILE* arrays. (#3965) 2012-07-29 04:04:12 -07:00
PKEuS 2f95b97c66 Message refactorization: checkobsoletefunctions.h and checknonreentrantfunctions.h 2012-07-29 02:30:03 -07:00
Daniel Marjamäki 0ead18122d Fixed #3695 (False positive: memory leak (ptr?free(ptr):0)) 2012-07-27 12:25:20 +02:00
Daniel Marjamäki 1a6f7ea9a0 Fixed #3998 (Tokenizer::simplifyEnum: wrong handling of expressions => crash) 2012-07-26 11:12:28 +02:00
PKEuS 9834888f19 Removed some duplicate tests and a redundant variable 2012-07-25 01:34:54 -07:00
PKEuS c11e8cdbfa Fixed false positive "Variable is not assigned a value" on class types 2012-07-25 00:34:27 -07:00
PKEuS f5e5d59562 Refactorizations:
- Removed redundant newlines at the end of test cases
- Make use of STL algorithms instead of own implementations of std::replace and std::remove+string::erase
- Removed unused variable (found by cppcheck)
- Prefer postfix increment (found by cppcheck)
2012-07-24 12:21:05 -07:00
PKEuS bb940e4722 Implemented unused variable checking for standard types (#2851) 2012-07-24 11:47:29 -07:00
Ettl Martin a6c54563ae #2553 added testcase 2012-07-24 15:54:38 +02:00
Daniel Marjamäki e6f761126c Fixed #2802 (False positive: ::free() is not recognised as free() to release buffers) 2012-07-24 09:28:08 +02:00
PKEuS 5c0cab238f Fixed useInitializationList false positives (#3988) 2012-07-23 08:16:47 -07:00
PKEuS ae6201d289 Fixed false positive "Parameter 'x' is passed as a value" for types like std::vector<T>::size_type (#3986) 2012-07-23 01:41:20 -07:00
Daniel Marjamäki a733c9b603 Fixed #3914 (false positive null pointer dereference, assignment in conditional) 2012-07-23 10:05:55 +02:00
Zhao Qifa 188d2e143d add a performance checker for const assignment 2012-07-22 09:17:00 +02:00
Ville Skyttä 7ab2f6a9fa Spelling fixes. 2012-07-21 18:11:20 +02:00
Ettl Martin 4312d31b87 #3979 added todo testcases 2012-07-19 09:44:06 +02:00
Daniel Marjamäki dc6c3228d7 Fixed #3834 (Preprocessor: -U doesn't work) 2012-07-18 20:57:00 +02:00
Daniel Marjamäki 17c27f51ff Fixed #3791 (False positive: returnTempReference) 2012-07-18 07:22:29 +02:00
Edoardo Prezioso aedaacba95 Don't report 'warning unknown pragma' message with GCC. 2012-07-18 00:48:45 +02:00
Daniel Marjamäki a768b0e8b2 Fixed #3954 (Pointer reference memory leak false positive) 2012-07-17 16:28:34 +02:00
Daniel Marjamäki d34924ba6d Uninitialized variables: Fixed false positive when there is assignment in condition 2012-07-17 07:03:40 +02:00
Daniel Marjamäki ddfc968028 Fixed #3891 (False positive 'Double deallocation:' due to ((void*)1)) 2012-07-16 17:07:51 +02:00
PKEuS 2103811291 Refactorizations in testrunner:
- Removed unnecessary space characters
- Removed comments from test cases which are not preprocessed
2012-07-16 05:02:33 -07:00
PKEuS 7d33181fba Refactorizations in testrunner:
- Avoid creation of std::string instances of static strings where possible in testrunner.
- Removed unnecessary include of tinyxml.h in testcppcheck.cpp
2012-07-16 04:17:14 -07:00
Daniel Marjamäki a96ec0ad46 Fixed #3804 (False positive: Member not initialized (simplifyTokenList removes const on pointers)) 2012-07-16 07:28:59 +02:00
PKEuS e9182f1fcc Implemented support for 'using namespace std;': Add std:: prefix to names that are known to be in std namespace. Simplify namespace (std::)tr1:: if C++11 flag is set. 2012-07-15 02:05:19 -07:00
PKEuS 1e704edbd5 Message refactorization: checkio.h/cpp 2012-07-13 10:36:58 -07:00
PKEuS 41fecb2e6d Fixed evaluation of redundant conditions (#3972) 2012-07-13 06:01:19 -07:00
PKEuS 247d820027 Fixed #3972: Don't issue auto variable error when the address is assigned to a reference to a non-pointer. 2012-07-13 05:21:45 -07:00
PKEuS 4ed15d87b6 Properly fixed test failure and line numbers in uselessCallsEmpty error 2012-07-13 05:15:58 -07:00
Daniel Marjamäki c6fdd2733b Test 'Preprocessor: Proper fix for #3690' 2012-07-13 13:04:10 +02:00
Daniel Marjamäki e4ad193b40 Fixed #3690 (CppCheck is stuck on evaluating false preprocessor expression( = 0)) 2012-07-13 11:28:45 +02:00
Daniel Marjamäki aa4fe3a1e2 fixed unit test 2012-07-13 08:38:27 +02:00
Daniel Marjamäki 6018bb4636 Fixed #3442 (unmatchedSuppression can't be suppressed) 2012-07-13 08:29:49 +02:00
PKEuS 5a91d6a0f5 Check for useless calls of .empty() (#3816)
Messages from CheckStl::uselessCalls() only shown when correct severity is enabled.
2012-07-12 03:23:52 -07:00
Daniel Marjamäki 8dd5270be3 Preprocessor: skip preprocessor directives in the Preprocessor::validateCfg function 2012-07-11 21:20:31 +02:00
PKEuS 2bd1f1d8dc Improved check: Sign checking in printf format string (#3511)
Removed some redundant code (already covered by token list simplifications and symboldatabase)
2012-07-11 10:46:35 -07:00
Daniel Marjamäki 4f4be79f20 Preprocessor: Fixed bugs in my #3643 fix 2012-07-11 18:29:33 +02:00