Commit Graph

413 Commits

Author SHA1 Message Date
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki 255b788d4d Fixed #4903 (Improve check: allocated but not initialized (condition)) 2018-01-02 23:20:46 +01:00
Daniel Marjamäki ba8222de1c ValueFlow: Put 'inconclusive' state in the ValueKind. A value can't be both known and inconclusive. 2017-09-20 22:41:36 +02:00
Daniel Marjamäki 57004ed533 Fixed #7663 (False positive: uninitialized variable (multi variables in inner scopes)) 2017-09-07 23:08:55 +02:00
Daniel Marjamäki d160d27417 Fixed #8172 (False positive uninitvar on sizeof *ptr) 2017-08-23 22:17:49 +02:00
Daniel Marjamäki e087156e30 CheckUninitVar: Try to activate the valueflow based checking again 2017-08-20 19:54:06 +02:00
Daniel Marjamäki 22919da9a8 Fixed #6246 (Defect: False positive due to ignoring struct initialisation when nested in a loop and assigned to a member) 2017-06-30 13:41:19 +02:00
Daniel Marjamäki 3ab8466415 refactoring, use early continue in for loop 2017-06-30 12:45:48 +02:00
Ayaz Salikhov 3cd2f2d092 Don't cast bool to bool 2017-06-01 01:49:40 +03:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 95db173e77 Fixed Cppcheck warning 2017-05-13 11:06:33 +02:00
Daniel Marjamäki f51a709f80 add fixme comment 2017-05-01 11:25:58 +02:00
Daniel Marjamäki ce6cc5416a uninitvar: made ValueFlow check experimental 2017-05-01 11:13:30 +02:00
Daniel Marjamäki 06102cb3d7 UninitVar: Don't warn for inconclusive values 2017-04-28 21:09:56 +02:00
Daniel Marjamäki 2f51b975ed valueFlowUninit: only check variables 2017-04-23 21:50:51 +02:00
Daniel Marjamäki 25a1ea3d18 use simpleMatch for simple pattern 2017-04-23 19:25:35 +02:00
Daniel Marjamäki 8a738eefab fixed #7998 (uninitialized variable is not found when used with switch/case) 2017-04-23 18:05:14 +02:00
Daniel Marjamäki 43454936e7 Fixed #8014 (FP: Uninitialized variable 'f(1,{..});') 2017-04-21 22:33:27 +02:00
PKEuS 3c8f5b85ae Refactorization: Allocate Token::_values (ValueFlow information) dynamically, reducing size of each token by around 10% 2017-03-27 18:48:34 +02:00
PKEuS 2f0db369f0 Refactorization: Avoid construction of empty strings by using emptyString 2017-03-01 10:50:50 +01:00
Matthias Krüger 6f1e7e897d simplify if(tok && Token::{simple,}Match) to if(Token::{simple,}Match). 2017-02-06 15:37:12 +01:00
Daniel Marjamäki c8a450c9be uninitvar: Fixed a FP seen in daca2 2016-12-25 22:43:29 +01:00
Daniel Marjamäki d79688c40b Fixed #7822 (False positive for uninitialized variable if array type is used) 2016-12-21 23:11:11 +01:00
PKEuS 2f6350a0d0 Refactorized Library 2016-12-06 14:09:28 +01:00
Matthias Krüger b3ace258ab there is no need to have "if(tok && Token::Match(tok,..." since Token::Match checks "tok" by itselfs already. 2016-11-26 17:22:30 +01:00
orbitcowboy a81920cae1 checkunusedvar: Check pointer against NULL before dereferencing it. 2016-10-31 15:57:34 +01:00
orbitcowboy bc32ccc894 CheckUninitVar::isFunctionParUsage: Avoid implicit conversion from type bool to int. 2016-10-29 21:41:55 +02:00
PKEuS e1a21a8bb1 Fixed internal warnings 2016-10-08 11:34:25 +02:00
Harald Scheidl 9f1b70fa04 new can initialize memory, don't warn in this case (#7623) 2016-10-08 10:03:09 +02:00
Daniel Marjamäki 9711064b74 Fixed #6646 (False positive uninitvar - loopvariable initialized inside loop) 2016-08-04 14:39:54 +02:00
Robert Reif 55b3f0bf38 Fixed #752 (SymbolDatabase: Does not match function if redundant keywords mismatch (C++)) 2016-08-04 09:06:32 +02:00
Daniel Marjamäki 2187e8ba02 CheckUninitVar: Fixed FP when dereferencing multidimensional arrays. Refactoring of testing. The FP was spotted when looking at #7092 2016-08-02 14:27:51 +02:00
Daniel Marjamäki dc2a92263a Fixed #7426 (RFC: time to replace simplifyEnum?) 2016-04-22 06:02:54 +02:00
Daniel Marjamäki 34b5e0ce99 Fixed #6873 (False positive uninitvar - variable initialized via pointer) 2016-02-07 18:48:57 +01:00
Alexander Mai d3546ea410 #7321 segmentation fault in valueFlowSwitchVariableScope::isVariableDeclaration 2016-02-03 22:49:57 +01:00
Roberto Martelloni 50fc784550 Mapped error ids stlBoundaries, stlcstr, useAutoPointerContainer, useAutoPointerArray, sprintfOverlappingData, strPlusChar, shiftTooManyBits, integerOverflow, uninitstring, uninitdata, uninitvar, uninitStructMember, deadpointer, va_start_referencePassed, va_end_missing, va_list_usedBeforeStarted, va_start_subsequentCalls to their CWEs. 2016-02-03 12:53:23 +00:00
Daniel Marjamäki b908bb18a9 Fixed #5503 (FP: Uninitialized variable - initialize in in if and else branch) 2016-01-30 20:48:28 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Alexander Mai f762affea0 Small refactoring: replace NULL by nullptr, remove redundant static keyword, Tokenizer::setVarId() uses const variable 'notstart' 2015-11-30 22:13:49 +01:00
PKEuS e8522c7883 Small refactorizations:
- #include cleanup
- Use std::array instead of std::vector
- Do not create a stringstream to concatenate 4 strings
- Use std::cout instead of printf
2015-11-29 10:56:44 +01:00
Daniel Marjamäki d93cf96a29 Fixed #6769 (false positive: Uninitialized struct member: epoch.integer) 2015-11-22 16:20:46 +01:00
Daniel Marjamäki 5f68f3ddf6 Fixed #6264 (FP: gimp: struct initialized via pointers to member variables) 2015-11-21 19:31:18 +01:00
Daniel Marjamäki fb0477affd CheckUninitVar: Fixed false negatives when there are conditions 2015-11-21 10:00:21 +01:00
Daniel Marjamäki d301cf28ec CheckUninitVar: Small logical fixes in conditions handling. 2015-11-21 08:32:25 +01:00
Daniel Marjamäki 4d3e231bd0 Fixed #3948 (False positive: variable not initialised - used in multi-condition if-clause) 2015-11-19 13:09:45 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Daniel Marjamäki 5772bbd206 Fix Cppcheck warning 'explicit constructor' 2015-11-18 15:56:48 +01:00
Daniel Marjamäki 6b9c12e806 CheckUninitVar: Refactoring and gcc-compatibility fix 2015-11-18 15:16:50 +01:00
Daniel Marjamäki e6ceae213e CheckUninitVar: Improving multi-variable value handling 2015-11-18 14:56:45 +01:00
Daniel Marjamäki 459a4e0cbe Fixed #7121 (False positive 'Uninitialized variable' converting pointer to reference) 2015-11-10 10:18:24 +01:00