4338 Commits

Author SHA1 Message Date
Robert Reif
9a79961b6c Fixed #4419 (False positive: Class does not have a constructor) 2012-12-24 06:46:30 +01:00
Daniel Marjamäki
56b7670468 Tokenizer::setVarId: Fixed problem in initializer list when parameter and class member has same name 2012-12-23 19:55:09 +01:00
Daniel Marjamäki
0b4da3d5cd Uninitialized variables: Fixed false positives when variable x is given a nonzero value when variable y is uninitialized. 2012-12-23 16:27:04 +01:00
Daniel Marjamäki
9e58714bb1 Cppcheck: Only show 'Too many configurations' and 'Interrupted checking' information messages when information severity is enabled 2012-12-23 08:23:52 +01:00
Robert Reif
dae232015e Fixed #4430 (FP: Member variable is not initialized in the constructor.) 2012-12-23 08:04:44 +01:00
Daniel Marjamäki
47e1a571f7 Tokenizer: Fixed goto problems 2012-12-22 19:28:53 +01:00
Daniel Marjamäki
7f6a10599b Fixed #4262 (Small Request/Suggestion for checks on array size of args (bounty offer)) 2012-12-22 09:23:34 +01:00
Daniel Marjamäki
365a260ddc Fixed #4398 (False negative: out of bounds (for loop)) 2012-12-22 08:00:05 +01:00
Robert Reif
80848c6e0e Fixed #4383 (Improve check: uninitialized member variable not detected when initialization is not proper) 2012-12-21 19:36:45 +01:00
Daniel Marjamäki
2050cd71db Uninitialized variables: Better testing of function handling 2012-12-21 19:32:56 +01:00
Daniel Marjamäki
dc6aa92f3b Uninitialized variables: warn about structs in C code 2012-12-21 18:50:38 +01:00
Daniel Marjamäki
cf84c211ed Uninitialized variables: Improved handling of function calls 2012-12-21 17:04:15 +01:00
Daniel Marjamäki
415ee977d8 Uninitialized variables : fixed false positives when passing address of pointer to function. 2012-12-21 16:57:49 +01:00
Daniel Marjamäki
7e8019e474 Fixed #4403 (False positive 'Conversion of string literal <string> to bool always evaluates to true.' with BOOST_ASSERT) 2012-12-20 20:48:48 +01:00
Daniel Marjamäki
ccdea4dc2b Uninitialized variables: Improved checking of functions 2012-12-20 19:45:30 +01:00
PKEuS
d82048f5f5 Fixed compiler error in VS10 2012-12-20 04:03:36 -08:00
Robert Reif
bb2a15c140 Symbol database: Better handling of 'using namespace N;'. Ticket: #4412 2012-12-20 06:53:04 +01:00
Daniel Marjamäki
3913fd8398 Fixed #4320 (False positives 'unassignedVariable' and 'uninitvar') 2012-12-18 19:02:30 +01:00
Daniel Marjamäki
1e2fb4f1a4 Unused var: Limit bailout for foreach loops. Only bailout if name contains 'foreach' or 'for_each'. Only bailout variables that are used more than once in the body. Ticket: #4155 2012-12-17 18:19:05 +01:00
Daniel Marjamäki
72ea94bf75 Fixed #4155 (false positive: Variable is assigned a value that is never used (inside BOOST_FOREACH loop)) 2012-12-17 17:07:56 +01:00
Daniel Marjamäki
a84d21f271 CheckMemoryLeaksInFunction: Fixed problems with catch and function calls. Ticket: #4405 2012-12-16 18:06:40 +01:00
Daniel Marjamäki
bca7927913 AST: generate tree from bottom and upwards 2012-12-16 11:48:19 +01:00
Daniel Marjamäki
aad3a041ad AST: Handle function calls 2012-12-16 10:06:55 +01:00
Daniel Marjamäki
1ad9c933ec AST: Improved handling of unary operators 2012-12-16 08:41:04 +01:00
Robert Reif
6732f05b95 Fixed #4404 (Forward declared class cause false style warning about missing constructor) 2012-12-16 07:18:03 +01:00
Daniel Marjamäki
fa8e5cd7d8 AST: Simple AST. Not used in the clients. Only part of the testing for now. 2012-12-15 20:21:09 +01:00
Daniel Marjamäki
d3f5fd4e59 Tokenizer: Fixed Token::Match pattern 2012-12-10 20:38:07 +01:00
Daniel Marjamäki
df03e3a8d2 Fixed #4395 (Wrong simplification of known variables in nested assignment) 2012-12-10 06:08:33 +01:00
Robert Reif
5a7ede2563 Fixed #4391 (False positive: ctor not detected after variable declaration) 2012-12-10 06:01:29 +01:00
Frank Zingsheim
327db15284 Fix #4045: memory leak not reported after usage of " + p[]" 2012-12-09 08:59:21 +01:00
Daniel Marjamäki
927a6e4794 Obsolete functions: removed 'ctime' warning. The function is obsolete but the message don't point out a good replacement nor where it's documented that this function is obsolete 2012-12-09 09:35:57 +01:00
PKEuS
410c0f98d9 Refactorized CheckObsoleteFunctions:
- Speedup checkobsoletefunctions by using symboldatabase and by not calling SymbolDatabase::findFunctionByToken() for each function call.
-> Benchmark (SQlite amalgamation):
    CheckObsoleteFunctions::runSimplifiedChecks(): 9s -> 0,016s (562%, 4% on entire runtime)
- Fixed false negative when passing function result as parameter
2012-12-08 02:46:30 -08:00
PKEuS
578e582987 Fixed regression #4368. 2012-12-08 00:26:10 -08:00
PKEuS
068c695bd1 Fixed false positive when ternary operator is used: case A&&B?B:A: 2012-12-07 12:44:30 -08:00
PKEuS
0ac4c3baf4 New check: Find suspicious case labels like 'case A||B:' 2012-12-07 12:27:32 -08:00
PKEuS
65db8b8b9f Fixed #4229 2012-12-07 11:45:20 -08:00
Edoardo Prezioso
0273c183a7 Run astyle and update the translation files.
I believe we need a hook script because else everytime we change a file we have to make a new commit to fix the discrepancies problems.
2012-12-07 01:49:51 +01:00
Robert Reif
63b585424d Fixed #4386 (False positive: ctor not detected) 2012-12-05 20:31:17 +01:00
Frank Zingsheim
b99d3f0767 Style change: Fixed #4369 (false positive: Variable 'i' is assigned a value that is never used)
based on aebdb3769fc0c3606480116202c9fbf542e8347f
due to comment in aebdb3769f
2012-12-05 20:18:14 +01:00
Frank Zingsheim
aebdb3769f Fixed #4369 (false positive: Variable 'i' is assigned a value that is never used) 2012-12-04 21:39:51 +01:00
Daniel Marjamäki
c91250cd6e Fixed #4277 (duplicateExpression finds false positive for floats in a union as a member of a class) 2012-12-03 17:05:37 +01:00
Daniel Marjamäki
b08ba5b575 Preprocessor: Refactoring previous fix 2012-12-02 20:17:25 +01:00
Daniel Marjamäki
cb06d07ae7 Fixed #4351 (Escaped whitespace gives wrong error) 2012-12-02 18:04:19 +01:00
Daniel Marjamäki
15ef6bb32f Fixed #4382 (Use of alloca causes VLA recommendation in C++) 2012-12-02 11:39:26 +01:00
Daniel Marjamäki
bf91454136 Fixed #4224 (False positive: Comparison of a boolean with an integer (neglecting a cast)) 2012-12-02 08:34:30 +01:00
Daniel Marjamäki
dba51c906e cleanup: removed redundant insideLoop assignment in checkunusedvar. Thank you zingsheim for the suggestion 2012-12-02 07:28:05 +01:00
Robert Reif
b216639069 Fixed #4378 (simplifyEnum doesn't simplify enum type within open and close parenthisis) 2012-12-02 07:22:55 +01:00
Edoardo Prezioso
45a16baaa0 Token: try to improve speed of multicompare macro. 2012-12-01 23:58:01 +01:00
Edoardo Prezioso
f6c23fa1e7 runastyle and fix checkInternal messages. 2012-12-01 03:17:55 +01:00
Edoardo Prezioso
9ce6630b28 Add some unused private copy ctors and operator=.
In Token and in Check classes, GCC -Weffc++ reports that it's better to override the copy constructors and the assignment operator to avoid problems with copied objects which could have the same pointers, hence with double frees, when we delete one of these pointers in the copied and in the original object.
2012-12-01 02:17:46 +01:00