Commit Graph

5616 Commits

Author SHA1 Message Date
PKEuS 92839ab4d2 Refactorizations:
- Rearranged members of Value to reduce structures size
- Removed redundant ctor of Value
- Fixed VS warning in tokenize.cpp
2014-04-12 12:04:55 +02:00
Alexander Mai 718e42f5ca Fix some clang warnings about type conversions 2014-04-11 23:35:53 +02:00
Alexander Mai 6da6508913 Extract new function MathLib::isDec() our of isInt() 2014-04-11 22:15:25 +02:00
orbitcowboy 6be53376f4 MathLib:IsNullValue(): removed commented out code. 2014-04-11 01:28:16 +02:00
orbitcowboy 9c08885caf MathLib:IsNullValue(): using a Finite State Machine to determine a string value contains a numeric NULL value. The NULL value can be Integer, Binary, Hex, Octal. The corresponding unit test cases are also included. 2014-04-11 01:27:05 +02:00
Philipp Kloke 1fafc7f4dc Refactorization: use MathLib::isNullValue in CheckOther::checkMemsetInvalid2ndParam(); Fixed it to support also float literals like "0.f" 2014-04-11 14:17:36 +02:00
Philipp Kloke cf30fab413 Refactorized inefficient usage of Token::findmatch in two checks in checkother.cpp 2014-04-11 14:17:35 +02:00
Philipp Kloke 20c3a5baf0 Refactorized switchCaseFallThrough: Removed lots of obsolete code 2014-04-11 14:17:35 +02:00
Robert Reif 7eb3988415 Fixed #5659 (False negative: mismatching allocation / deallocation whith using namespace) 2014-04-11 05:40:37 +02:00
Alexander Mai ab2f8bfba3 Tidy up MathLib::isInt() - using a state machine approach 2014-04-10 22:46:55 +02:00
PKEuS b10fce304e Don't suggestInitializationList for arrays used as initializer (#5640) 2014-04-10 22:28:02 +02:00
PKEuS 2aaae741dd Fixed cppcheck message 2014-04-10 21:58:53 +02:00
PKEuS c33498fa0b Fixed false positive redundantAssignment when operator() is called (#5568) 2014-04-10 21:56:30 +02:00
Alexander Mai 559a2bc2c8 Avoid FP exceptThrowInNoThrowFunction and exceptThrowInNoexecptFunction 2014-04-10 21:55:49 +02:00
PKEuS e39b89efc3 Throw more syntaxErrors from SymbolDatabase, fixing #5663 2014-04-10 20:11:03 +02:00
PKEuS 25b1f2f541 Fixed #5643 (crash on address-of-operator& in condition) as suggested by serval2412 2014-04-10 19:49:21 +02:00
Alexander Mai e19129a409 Fix #4724 (Error in calculation shift operation: wrong sign: 1UL << 63) 2014-04-10 19:22:14 +02:00
Robert Reif b0af67f369 Fixed #5486 (false positive: (warning) %zd in format string (no. 1) requires 'ssize_t' but the argument type is 'ssize_t {aka long}'.) 2014-04-10 17:25:11 +02:00
Robert Reif 847d28d283 Fixed #5638 (is there any plan to check noexcept correctness?) 2014-04-10 16:17:10 +02:00
Robert Reif 4ae204e46b Fixed #5659 (False negative: mismatching allocation / deallocation whith using namespace) 2014-04-10 16:11:11 +02:00
Daniel Marjamäki c8ae1e4751 Fixed #5658 (false positive: (error) Uninitialized variable: s) 2014-04-10 15:59:37 +02:00
Daniel Marjamäki 9b1d058410 Fixed #5660 (false positive: (error) Uninitialized variable: result) 2014-04-10 06:40:53 +02:00
Daniel Marjamäki 59cd1879db Fixed #5467 (False positive incorrectly claiming use after erase) 2014-04-09 10:32:56 +02:00
Alexander Mai 89dc652af9 #5631 Typo and misleading error message in negativeMemoryAllocationSize 2014-04-08 20:23:00 +02:00
Daniel Marjamäki d7e2e3bd5e Fixed #5502 (FP: Dereferencing 'b' after it is deallocated / released) 2014-04-06 18:45:24 +02:00
Daniel Marjamäki 456e33fc7b Code cleanup
[ci skip]
2014-04-05 08:27:52 +02:00
Daniel Marjamäki 049d68ae7d AST: Fixed bad syntax tree for 'if (x()[0]==1);' 2014-04-05 08:03:24 +02:00
Alexander Mai 173a2e9ea2 #5641 fix crash within CheckClass::initializeVarList() 2014-04-04 22:13:51 +02:00
Daniel Marjamäki 0788e64eb8 Removed unused function expressionsHasSideEffects() 2014-04-04 07:04:19 +02:00
Daniel Marjamäki 8dcb3bae47 Refactoring checks of overlapping conditions in if and else-if 2014-04-03 19:35:50 +02:00
Daniel Marjamäki 1a83338faf Refactoring. Created utility function isOppositeCond() 2014-04-03 17:08:42 +02:00
Daniel Marjamäki 110f956029 code cleanup for invertOperatorForOperandSwap() 2014-04-03 16:22:07 +02:00
Daniel Marjamäki ffac614f7e Fix Cppcheck warning. Use reference to avoid redundant data-copy 2014-04-03 16:16:39 +02:00
PKEuS d9358de8b4 Refactorization: Use templates and rValue references
-> Performance gain of up to 15% on entire checking time (depends on setup; Result was checked with VS12 (x64), matchcompiled version, ran on tinyxml and cppcheck itself)
2014-04-03 15:03:37 +02:00
Daniel Marjamäki dcc245be9e Merge pull request #283 from Dmitry-Me/bracemacroparameter
Macro parameter was not braced.
2014-04-03 07:22:34 +02:00
Daniel Marjamäki 9f80f3a4e8 Small cleanups in the code 2014-04-03 06:37:02 +02:00
Daniel Marjamäki a115bbbbb5 Refactoring CheckOther::checkCharVariable() using AST 2014-04-03 06:27:29 +02:00
Daniel Marjamäki a6557f8c74 Null pointer: Fixed false positive discovered by Travis when self-checking cppcheck 2014-04-02 19:39:42 +02:00
Daniel Marjamäki 189360ae20 ValueFlow: changed back bailout message 2014-04-02 19:22:40 +02:00
Daniel Marjamäki f13be7fb6c Travis: Fixed possible null pointer dereference reported by travis 2014-04-02 19:08:44 +02:00
PKEuS a6e134e811 Removed compatibility code for Borland and Sun compilers which should not be necessary for a compiler supporting C++11 (as required by cppcheck). 2014-04-02 17:26:59 +02:00
Dmitry-Me 3244a61cac Macro parameter was not braced. 2014-04-02 09:25:13 +04:00
Daniel Marjamäki 3c64c70ce2 ValueFlow: Added utility functions getValueLE and getValueGE to simplify usage 2014-04-02 06:49:28 +02:00
Daniel Marjamäki bc9bb17025 Refactor CheckOther::oppositeInnerCondition() using AST and isSameExpression() 2014-04-02 16:54:01 +02:00
PKEuS e9411e05ba Refactorized inefficient usage of std::string and const char[]. 2014-04-02 13:56:34 +02:00
Daniel Marjamäki f4cdb2c46a CheckOther::checkCharVariable: Refactoring using AST 2014-04-01 19:16:06 +02:00
PKEuS 5953f02654 Refactorization: Simplifications in symboldatabase 2014-04-01 10:13:00 +02:00
Daniel Marjamäki 830249d72e Fixed #5510 (FP: nullPointer - variable initialized in function call) 2014-04-01 07:06:20 +02:00
PKEuS e0574feabd Fixed problems with unknown macros for inline class methods in SymbolDatabase (#5621) 2014-03-31 21:04:01 +02:00
PKEuS 025850d961 Support unknown THROW()-style macros in symboldatabase; Fixed #5056.
Simplified related code.
2014-03-31 20:33:01 +02:00