Commit Graph

3954 Commits

Author SHA1 Message Date
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
PKEuS e8f4dce25f Added check to CheckInternal: detect invalid patterns like "%typ%"
Replaced some Token::Match by Token::simpleMatch (suggestions of internal checks)
2012-07-11 08:45:16 -07:00
PKEuS 524df179af Fixed (unexpected) compilation error: Cast argv to 'const char**' 2012-07-11 02:29:20 -07:00
PKEuS 0ea1124a19 Fixed warning of Intel Compiler:
- standard conformant main function in testrunner.cpp
Fixed warning of Intel and MSVC Compilers:
- commented out unused parameter
2012-07-11 01:26:32 -07:00
Daniel Marjamäki 17cf24ed34 Fixed #3643 (Preprocessor: Invalid configuration (macro is used in code)) 2012-07-10 20:29:04 +02:00
PKEuS 68e19b33ff Fixed parsing of C++11 initializatation in initializer list (#3957) 2012-07-10 06:15:11 -07:00
PKEuS 37d9d6fd7e Improved parsing of C++11 initializer list (#3956) in CheckClass::initializeVarList. 2012-07-10 05:47:51 -07:00
PKEuS a93c47988c Restored comment that was modified by accident. 2012-07-09 11:40:49 -07:00
PKEuS 4b3ee97f54 Fixed test failures. 2012-07-09 11:36:28 -07:00
PKEuS b5589e41f9 Cleanup of VS10 solutions (As suggested by XhmikosR). Fixed problems:
- UNICODE set correctly
- Fixed path to pcre.lib; use external library directories
- Removed several unnecessary and redundant flags from projects

Thank you for your help, XhmikosR!
2012-07-09 08:09:54 -07:00
Edoardo Prezioso fae40c4782 Change every C version of 'size_t' to C++ 'std::size_t'. 2012-07-09 13:30:18 +02:00
PKEuS 639f15645a Message refactorization: checkbufferoverrun.cpp (2), checkclass.cpp, checkexceptionsafety.h 2012-07-09 02:11:05 -07:00
PKEuS ed7e950671 Message refactorization: checkbufferoverrun.cpp 2012-07-08 06:51:24 -07:00
Daniel Marjamäki 848fd59cbd Fixed #3913 (boundcheck, false positive continue in loop) 2012-07-08 14:34:47 +02:00
PKEuS 1032312fe1 Committed forgotten test64bit.cpp; tests should work again. 2012-07-08 05:28:17 -07:00
Daniel Marjamäki bf98e952c1 Fixed #3927 (false positive: (error) Uninitialized variable: new) 2012-07-08 13:59:00 +02:00
PKEuS 0f1cb4c98c Message refactorization: checkassignif.cpp, checkautovariables.cpp 2012-07-07 11:31:18 -07:00
PKEuS 43c060b630 Removed preprocessor directives from tests that aren't preprocessed before being tokenized. 2012-07-07 11:21:08 -07:00
Pino Toscano 5262ba16d9 Fixed #3947 (build failure if PATH_MAX is not defined) 2012-07-07 19:55:43 +02:00
Daniel Marjamäki 49198f52c4 Fixed #3934 (False positive for logical conjunction with enum and define) 2012-07-07 15:34:26 +02:00
PKEuS d3c44c20ff Refactorized checking of scanf field width specifiers (#3946):
- Removed duplicate check
- Changed severity to portability, when a crash only happens with certain libc versions
- Fixed handling of * in format string (#3877)
- Added support for [...] pattern
- Removed garbage from tests
2012-07-07 04:34:37 -07:00
PKEuS dec4844c10 Define _WIN64 in VS10 solution when compiling for x64 2012-07-07 02:41:41 -07:00
PKEuS 2c9545f603 Fixed #3797: _ is a valid character in suppression IDs 2012-07-06 09:16:43 -07:00
PKEuS 5caab6ba10 Fixed crash on garbage code (#3870) 2012-07-06 09:03:33 -07:00
Daniel Marjamäki 7122aeff58 Fixed #3617 (CLI: '-DMACRO' should be considered as '-DMACRO=1') 2012-07-05 19:35:41 +02:00
Daniel Marjamäki f9da83f4b5 Fixed #3926 (false postive: (error) Uninitialized variable: exitpattern) 2012-07-03 18:52:23 +02:00
Robert Morin 25c1cc4c8e Improve check: warn when comparing boolean value with < <= > >=. Ticket: #2617 2012-07-03 06:39:13 +02:00
Thomas Sondergaard f72ddbb2e9 Fixed #3912 (Analysis failed) 2012-07-03 06:34:14 +02:00
Ettl Martin 7401104f45 #2773 added missing testcase 2012-07-02 10:01:37 +02:00
Daniel Marjamäki 325414e354 CheckLeakAutoVar: Updated error messages 2012-06-30 16:23:10 +02:00
Daniel Marjamäki bb9f114d84 Fixed #3924 (False positive: Uninitialized variable (const pointer)) 2012-06-30 12:12:36 +02:00
Daniel Marjamäki cb7757f650 CheckUnusedVar: dont report false positives for extern variables 2012-06-28 17:22:56 +02:00
Daniel Marjamäki 2e3a08a8c1 Fixed #3916 (false positive: uninitialized variable when using assignment and , in rhs) 2012-06-27 20:44:19 +02:00
Daniel Marjamäki 9da3373876 Fixed #3919 (False positive: uninitialized variable (extern)) 2012-06-26 18:28:41 +02:00
Daniel Marjamäki 0042ee7bc8 Fixed #3660 (False positive memleak (allocation function uses non-local variable)) 2012-06-25 20:00:50 +02:00
PKEuS f5c42660de Fixed #3909: Handle constructor syntax initialization. 2012-06-24 09:57:17 -07:00
Daniel Marjamäki 25b24d149f Fixed #3910 (False positive: Variable is not assigned a value (pointerArray alias)) 2012-06-24 16:54:37 +02:00
Daniel Marjamäki 8af044255d Tokenizer: Added new function isFunctionParameterPassedByValue that check if a parameter is passed by value 2012-06-24 13:40:09 +02:00
Ettl Martin 8c39b95aae #3873 added testcase to make sure false positive does not appear again. 2012-06-24 00:00:15 +02:00
Daniel Marjamäki abde1d0ec1 added comment in test case 2012-06-23 20:20:11 +02:00
Daniel Marjamäki 72d24ab4b4 Fixed #3904 (false positive memory leak with linked list) 2012-06-23 20:15:58 +02:00
Daniel Marjamäki 162a430354 Fixed #3868 (false positive: (style) Same expression on both sides of '|'.) 2012-06-23 19:54:15 +02:00