PKEuS
b10fce304e
Don't suggestInitializationList for arrays used as initializer ( #5640 )
2014-04-10 22:28:02 +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
orbitcowboy
baf8d09a0d
Fixed FP for nullpointer dereference when using putchar.
2014-04-09 17:02:17 +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
orbitcowboy
dd61c5db47
Fixed FP, nullpointer for memchr.
2014-04-08 18:39:50 +02:00
Alexander Mai
89dc652af9
#5631 Typo and misleading error message in negativeMemoryAllocationSize
2014-04-08 20:23:00 +02:00
Alexander Mai
a06371e063
Fixes for Doxygen + code formatting
2014-04-07 20:39:19 +02:00
unknown
9ae59290dd
#5645 False positive Null pointer derefence about first argument to fputc()
2014-04-07 12:08:34 +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
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
71fda0ea0c
Fixed GCC warning about shadowed variable settings
2014-04-04 07:02:36 +02:00
Daniel Marjamäki
8dcb3bae47
Refactoring checks of overlapping conditions in if and else-if
2014-04-03 19:35:50 +02:00
PKEuS
d4765bccc3
Refactorized inefficient usage of std::string and const char[] (part 2).
2014-04-03 14:56:14 +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
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
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
Daniel Marjamäki
484483bd5d
AST: fixed ast for 'for (*x=0;y;z)'
2014-03-31 17:16:13 +02:00
Daniel Marjamäki
225fb96554
Fixed #5627 (False positive assignBoolToPointer)
2014-03-31 15:55:54 +02:00
Daniel Marjamäki
963a8b51cc
"automatic conversion from iso-8859-1 formatting to utf-8"
2014-03-31 00:33:43 +00:00
PKEuS
060f9035c9
Fixed crashs on garbage code ( #5604 )
2014-03-30 11:38:01 +02:00
PKEuS
345a80f4d5
Fixed #5621 and slightly simplified symboldatabase code.
2014-03-30 11:06:44 +02:00
Alexander Mai
70885c78e4
Fix endless recursion within CheckClass::isConstMemberFunc() caused by incomplete/missing template declaration
2014-03-30 10:09:57 +02:00
Alexander Mai
bf335217cd
Fix #5605 part 2 - now endless recursion within CheckClass::isMemberFunc()
2014-03-30 08:31:02 +02:00
Daniel Marjamäki
e5301b2b7a
ValueFlow: Improved valueflow of for loop 'for (i=a; i<10; i++)' => unknown start value but end value is known
2014-03-29 20:20:22 +01:00
Daniel Marjamäki
407c9fdf9d
Refactored checkNegativeBitwiseShift() so it uses ast and valueflow
2014-03-29 13:01:30 +01:00
Alexander Mai
d1b1699bb0
Fix #5606 - Endless recursion in CheckClass::isMemberVar(). New function Type::hasCircularDependencies() is supposed to detect loops within the class hierarchy which was causing the problem
2014-03-29 12:21:35 +01:00
Alexander Mai
d6888410ec
Ticket #3322 : Add test cases. The bug got fixed long time ago
2014-03-28 20:09:22 +01:00
PKEuS
a01bfcb62d
Fixed a few cppcheck messages
2014-03-28 18:55:16 +01:00
PKEuS
a16d631813
Further improvements to setVarId and function/array pointer detection in SymbolDatabase ( #2872 )
2014-03-28 17:43:40 +01:00
PKEuS
1c58628223
Handle pointer/reference to array in setVarId ( #2645 )
2014-03-28 16:10:27 +01:00
PKEuS
50a94885ce
Fixed oppositeInnerCondition check:
...
- Resolved false positives #4170 and #4186 , as well as numerous other potential false positives
- Improved message to point to both locations
- Inner condition could also be a while loop; Outer if could also be 'else if'
- Made the check non-experimental again (#3645 )
2014-03-28 14:55:17 +01:00
Matthias Krüger
e1f759b5b8
run dmake
2014-03-28 13:50:02 +01:00
PKEuS
c078b3fced
Added testing of samples/ to testrunner ( #3515 ).
2014-03-28 13:06:38 +01:00
PKEuS
838cac5a3a
Added unit test for #1473 .
2014-03-28 11:34:23 +01:00
PKEuS
3950a62ef2
Added unit test for #2626
2014-03-28 10:06:24 +01:00
PKEuS
63254b33f9
Fixed uncaught exception in testbufferoverrun.cpp
2014-03-27 19:55:11 +01:00
PKEuS
825b8b7c66
Unit test for #3589
2014-03-27 19:16:30 +01:00
PKEuS
a6ca3cf2cf
Throw syntaxError when encounter one in symboldatabase ( fixes #5572 )
2014-03-27 19:06:13 +01:00
PKEuS
efe3f834be
Refactorized handling of syntaxError: Print debug output, removed a few return values that are no longer required
2014-03-27 18:41:52 +01:00
Daniel Marjamäki
581886636d
CheckBool::checkComparisonOfBoolExpressionWithInt: Rewrite the check using AST instead of token list
2014-03-27 16:10:43 +01:00
PKEuS
9b307cf8e0
Improved readability of testsuite output when ASSERT_EQUALS_MSG fails.
...
Fixed another true positive in checkbufferoverrun.cpp
AStyle
2014-03-27 16:06:30 +01:00
PKEuS
7e4081f7f5
Treat syntaxError and cppcheckError as InternalErrors (throw as exception, #4268 )
2014-03-27 13:15:21 +01:00
PKEuS
b23aebf2f0
Show redundantCopyLocalConst for STL types ( #4331 )
2014-03-27 11:15:17 +01:00
PKEuS
379807a8ea
Fixed TODO_ASSERT_EQUAL and #5614 caused by bad simplification of return values.
2014-03-27 11:04:31 +01:00
Daniel Marjamäki
2248cdfea0
CheckBool::checkAssignBoolToPointer: Refactor to use AST.
2014-03-27 05:39:48 +01:00
PKEuS
f71a4ad216
Improved information message on missing headers when included with <> ( #4772 )
2014-03-26 15:22:22 +01:00
PKEuS
6c4e8761c8
Fixed false positive "unused function" #5113 .
2014-03-26 12:34:21 +01:00
PKEuS
1677e2913e
Regression test for #5061 .
2014-03-26 12:17:27 +01:00
PKEuS
848d079c71
Refactorized detection of function usage in CheckUnusedFunction, fixed #5358
2014-03-26 09:12:41 +01:00
PKEuS
02f38772cc
Refactorization: Use SymbolDatabase to find functions in CheckUnusedFunctions
2014-03-26 08:54:56 +01:00
Daniel Marjamäki
6da9cca4ab
fixed unit test that I broke by mistake
2014-03-25 21:45:25 +01:00
Daniel Marjamäki
87daf5783e
buffer overflow: clean up old checking for negative index
2014-03-25 20:37:32 +01:00
Daniel Marjamäki
c8004a8d31
Buffer overruns: Use ValueFlow to detect negative index
2014-03-25 18:22:22 +01:00
PKEuS
9b4b90f6a0
Avoid loading libraries multiple times in test suite
...
-> Massive speedup for test suite (especially on slow systems)
2014-03-24 09:59:05 +01:00
Daniel Marjamäki
aa05bf0f16
ValueFlow: Improved abstract interpretation
2014-03-24 06:48:06 +01:00
Daniel Marjamäki
2a0716449f
Fixed #5498 (C++0x11 default values for class fields and missing constructor)
2014-03-24 06:15:51 +01:00
Daniel Marjamäki
dbc8273cb7
ValueFlow: improved abstract interpretation of for loops
2014-03-24 00:16:02 +01:00
Daniel Marjamäki
c14a3d67bb
ValueFlow: Handle division by zero better in abstract interpretation
2014-03-23 20:37:56 +01:00
PKEuS
1be7bfa7fe
Fixed crash on invalid code ( #5603 )
2014-03-23 20:08:16 +01:00
Daniel Marjamäki
30fa187b30
Fixed #5549 (ValueFlow: Handle static variables better in valueFlowAfterAssign)
2014-03-23 17:57:27 +01:00
PKEuS
5f2067e401
Refactorized dead code elimination:
...
- Use library to get noreturn functions
- Fixed do-while simplification (#4940 )
2014-03-23 10:59:41 +01:00
PKEuS
77c17100ec
Bailout in private function usage checking for operators ( #5059 ).
2014-03-23 10:06:14 +01:00
PKEuS
8d5be8c4a4
Fixed related issues to #5601
2014-03-22 22:35:20 +01:00
PKEuS
58c2f372b9
Fixed false positive when noreturn function is defined ( #5601 , second attempt)
2014-03-22 19:55:13 +01:00
PKEuS
6395cb9b95
Syntax error on invalid enum ( #5600 )
2014-03-22 19:31:01 +01:00
Daniel Marjamäki
b6276058da
Value Flow: Improved abstract interpretation of arithmetical expressions
2014-03-22 19:02:33 +01:00
PKEuS
77c871035b
Fixed false positive when noreturn function is defined ( #5601 )
2014-03-22 18:57:19 +01:00
Daniel Marjamäki
7d2357de8d
Refactoring. Use astIsFloat()
2014-03-22 18:42:29 +01:00
PKEuS
560cf397d3
Fixed C++11 right angle bracket issue #5150
2014-03-22 13:34:15 +01:00
Alexander Mai
6a08c27183
Fix segfault in variableIsUsedInScope() - loop variable not check against NULL
2014-03-22 11:14:11 +01:00
Alexander Mai
e1c565357a
Invalid code cause SIGSEGV since loop variable tok2 was not checked properly
2014-03-22 10:32:24 +01:00
Alexander Mai
37befc75ef
In case of a loop within the class hierarchie Function::isImplicitlyVirtual_rec() was entering an endless loop. Tracking the previously analyzed types shall prevent this.
2014-03-22 08:49:28 +01:00
Martin Ettl
e00f50b850
Fixed #5597 and added abort() support to stdcfg.
2014-03-21 17:36:48 +01:00
PKEuS
49b25b05d9
Fixed crash in CheckBufferOverrun on garbage code ( #5595 )
2014-03-21 13:20:44 +01:00
orbitcowboy
6507824a34
Added support for putchar() to std.cfg.
2014-03-20 05:49:38 +01:00
orbitcowboy
80e3b49cfc
Added support for ftell() and puts() to std.cfg.
2014-03-20 04:10:41 +01:00
Daniel Marjamäki
fc014f055f
ValueFlow: Removed wrong bailout
2014-03-21 08:33:45 +01:00
orbitcowboy
30006cf06f
Added support for fputs() to std.cfg.
2014-03-20 02:13:41 +01:00
Daniel Marjamäki
54e7f34f4a
Fixed #5584 (FP: Division by zero when function not declared)
2014-03-20 16:12:58 +01:00
orbitcowboy
b37e9601c1
Added support for fgetc() to std.cfg.
2014-03-20 00:59:52 +01:00
Daniel Marjamäki
8de4246713
Uninitialized variables: Improved handling of function calls when struct members are checked
2014-03-20 06:48:17 +01:00
Martin Ettl
fe1b46c174
Extended std.cfg
2014-03-19 21:08:48 +01:00
Robert Reif
5c88934431
CheckIo: Fixed FIXME
2014-03-19 20:57:33 +01:00
Daniel Marjamäki
d939aa63a6
Tokenizer: Added test case for fixed crash to prevent regressions later
2014-03-19 16:47:11 +01:00
Robert Reif
806ef44509
Fixed #5328 (Does not handle __attribute((xxx)) in typedefs)
2014-03-19 05:38:23 +01:00
Daniel Marjamäki
01c29ed15f
Fixed #5518 (FP regression in 1.64: Array accessed out of bounds)
2014-03-18 17:04:33 +01:00
PKEuS
a3f5beb75d
Fixed problems with code "enum class { };" (which is valid C)
2014-03-18 16:23:30 +01:00