Daniel Marjamäki
f74c30e116
Fixed #4231 (False positive: (error) Returning/dereferencing 'ptr' after it is deallocated / released (ignoring goto))
2012-10-08 17:23:47 +02:00
Daniel Marjamäki
61183e7896
astyle formatting
2012-10-08 16:23:05 +02:00
Daniel Marjamäki
fefd8529c6
Fixed #4007 (False positive: 'Possible null pointer dereference' when using short-circuit evaluation)
2012-10-07 19:06:49 +02:00
Daniel Marjamäki
6a37942431
Fixed #3935 (False report for accessing array out of bounds after casting to short)
2012-10-07 18:38:05 +02:00
Alexander Mai
3656366c7e
Fixed #4257 (False Positive: String literal compared with variable - for non-pointer variable)
2012-10-07 16:26:03 +02:00
Daniel Marjamäki
0115bb8d24
Fixed #4102 (False positive: 'find('=') + 1U' can't be replaced with compare)
2012-10-07 12:43:14 +02:00
Daniel Marjamäki
4c1abde48e
Reverted 107b3b44
. Write syntax error for 'if MACRO()'. We can't know if MACRO() is supposed to be used in the condition or if it is some annotation that should be removed. Ticket #4171
2012-10-06 19:12:39 +02:00
Edoardo Prezioso
e3bbcf501f
Fixed #4234 (segmentation fault of cppcheck in Tokenizer::simplifyFlowControl() (invalid code))
2012-10-06 13:37:44 +02:00
Daniel Marjamäki
c2b61030a8
Fixed #4254 (Tokenizer::simplifyIfAssign: varids not preserved)
2012-10-06 12:49:24 +02:00
Daniel Marjamäki
dbddbe75bf
Path: Removed java/c# handling. Thanks amai.
2012-10-03 19:47:14 +02:00
Daniel Marjamäki
1e024a9abc
cleanup more java/c# code. Thanks amai for telling me about this.
2012-10-03 19:19:49 +02:00
Daniel Marjamäki
2f069f550f
Removed Java/C# handling
2012-10-02 18:44:36 +02:00
Daniel Marjamäki
9a462d8a0a
Fixed #4225 (False positive: uninitialized variable (assignemnt in ternary expression with cast))
2012-09-30 18:49:25 +02:00
Daniel Marjamäki
a64669b1ec
Fixed #4203 (Don't warn about setting NULL value for pointers and not using that value)
2012-09-30 17:22:35 +02:00
Daniel Marjamäki
c65ac603e9
Fixed #3837 (False positive: national locale inline asm comments are reported as unsupported)
2012-09-30 09:35:32 +02:00
Daniel Marjamäki
4e1bef5535
AssignIf: better handling of function calls
2012-09-29 19:22:34 +02:00
PKEuS
c4b881f844
Refactorizations in tokenize.cpp and testsimplifytokens.cpp:
...
- Avoid const_cast in testsimplifytokens.cpp
- Removed redundant null-check (VS11 code analysis)
- Fixed MSVC compiler warning
- Replaced some indentation counters
2012-09-29 14:10:41 +02:00
XhmikosR
5101243c64
use const_cast instead of c cast
2012-09-29 13:15:09 +02:00
PKEuS
c17853949d
Fixed scope handling problems with CheckOther::checkComparisonOfFuncReturningBool(), removed its experimental status.
2012-09-29 11:23:30 +02:00
Daniel Marjamäki
10aa667648
assignif: Fixed testcase. parse while loops if variable is local and not external.
2012-09-29 10:54:09 +02:00
Daniel Marjamäki
44926654a4
df
2012-09-29 10:41:12 +02:00
Daniel Marjamäki
12cfdee61b
AssignIf: Check into scopes recursively
2012-09-29 10:33:54 +02:00
Daniel Marjamäki
52be4a5925
Disabled checkComparisonOfBoolWithBool since there are false positives. Ticket #2617
2012-09-28 19:11:36 +02:00
Daniel Marjamäki
ff4f8b58f3
Disable checkComparisonOfFuncReturningBool check because of false warnings. Ticket #2617
2012-09-28 18:51:10 +02:00
Daniel Marjamäki
bb62325ddb
AssignIf: Better handling of complex conditions with multiple subconditions
2012-09-28 17:03:16 +02:00
Alexander Mai
074b7781b2
Fixed #4239 (segmentation fault of cppcheck (invalid code))
2012-09-27 06:35:36 +02:00
Daniel Marjamäki
9f7a0146d0
AssignIf: Detect mistake in such code: 'int x=y&4; if ((x==3)||..'
2012-09-26 20:15:46 +02:00
Mohit Mate
9e297c95f2
Fixed #2617 (improve check: comparing boolean with '<')
2012-09-26 18:18:36 +02:00
Daniel Marjamäki
8010bcfbe8
astyle formatting
2012-09-26 18:17:02 +02:00
Daniel Marjamäki
753942df0c
Revert "Fixed #4165 (False positive:(error) Uninitialized variable: here)"
...
This reverts commit 96b1890797
.
2012-09-26 16:15:35 +02:00
Daniel Marjamäki
96b1890797
Fixed #4165 (False positive:(error) Uninitialized variable: here)
2012-09-25 20:45:42 +02:00
Daniel Marjamäki
0ff8105c71
Fixed #4074 (Internal error. Token::Match called with varid 0)
2012-09-24 06:44:51 +02:00
Daniel Marjamäki
990340ba98
Fixed #4072 (False positive: Structure is not initialized in the constructor (1.55))
2012-09-23 18:29:05 +02:00
Daniel Marjamäki
68240fffc6
Fixed #4228 ((error) Internal error. Token::Match called with varid 0 (multiple declarations in for loop))
2012-09-23 17:15:39 +02:00
Daniel Marjamäki
ec01cc811e
Second fix for #4207 (Internal error. Token::Match called with varid 0)
2012-09-23 13:25:28 +02:00
Daniel Marjamäki
865c0205e3
Fixed #4210 (Unmatched suppression warning emitted from disabled check)
2012-09-23 10:56:12 +02:00
Daniel Marjamäki
c9c04f9691
Fixed #4038 (FP: possible null pointer dereference)
2012-09-23 09:20:16 +02:00
Daniel Marjamäki
2e3a7db4eb
Fixed #4115 (Incorrect uninitialized variable error message with realloc macro)
2012-09-22 18:41:33 +02:00
Daniel Marjamäki
37695d44f3
Fixed #4085 (tinyxml2 false positives)
2012-09-22 16:49:28 +02:00
Daniel Marjamäki
a17f37c67d
CheckBufferOverrun: Better handling of functions with variable arguments
2012-09-22 16:19:19 +02:00
Daniel Marjamäki
d3e990b1e5
Fixed #3987 (False positive: Memory leak reported when throwing/catching)
2012-09-22 10:37:27 +02:00
Daniel Marjamäki
6d928a2ff7
Fixed #4119 (false positive with operator= when implemented in terms of swap)
2012-09-22 08:50:36 +02:00
Daniel Marjamäki
a65f427195
Fixed #3836 (False positive: variable not initialized in copy constructor/operator (attached example code)
2012-09-22 08:16:16 +02:00
Daniel Marjamäki
6c25f3662e
Tokenizer::simplifyEnum: Don't simplify enums in function heads. Ticket #3953
2012-09-21 16:17:20 +02:00
Edoardo Prezioso
8e1e8525a3
Partial rewrite of Tokenizer::simplifyComma:
...
skip '= { .. }' where possible;
hence remove '%num% after comma' check because it's redundant now;
replace round braces counter method with faster 'link skip';
if 'endAt' is 'NULL' after finding the ';' token, exit the function;
hence remove redundant 'tok != NULL' check after simplifying 'return' code.
2012-09-20 21:45:16 +02:00
Edoardo Prezioso
406483b618
Fixed valgrind error in #3953 , but there's still the bad enum problem.
2012-09-20 21:07:37 +02:00
Daniel Marjamäki
de8e592d00
Class: Show inconclusive warnings about unknown types that are not initialized in copy constructors. Ticket: #3611
2012-09-20 19:16:26 +02:00
Daniel Marjamäki
7d3e661774
Fixed #3611 (CheckClass: uninitVar and operatorEqVarError false positives (non-copyable members))
2012-09-20 16:47:01 +02:00
Daniel Marjamäki
aa3cdc6b6f
Fixed #3565 (Variable hides enumerator (attached code example))
2012-09-19 19:19:13 +02:00
Daniel Marjamäki
c3cb6202ed
Fixed #4172 (TemplateSimplifier: Handle 'A<&f> x' template instantiation)
2012-09-19 16:10:13 +02:00