Daniel Marjamäki
f118c22bb6
CheckUnusedVar: Cleanup checker
2018-12-17 17:48:45 +01:00
Daniel Marjamäki
cf09fd6274
CheckUnusedVar: Code cleanup
2018-12-17 17:28:15 +01:00
Daniel Marjamäki
c8d688607a
Fixed #8901 (Unused value: const variable initialization)
2018-12-16 19:01:05 +01:00
Daniel Marjamäki
1f27cd56c0
FwdAnalysis; Code cleanup, isNullOperand
2018-12-13 21:01:33 +01:00
Daniel Marjamäki
0b4e08cac9
Use FwdAnalysis in UnusedVar. This is still work-in-progress. Merging to master branch so it can be tested.
2018-12-13 18:52:56 +01:00
Daniel Marjamäki
69f6100d83
Fixed #8339 (false positive: unread variable despite delete is used on it)
2018-11-14 17:04:21 +01:00
Daniel Marjamäki
ac242b69d6
Refactoring: Use range for loops
2018-11-14 06:58:21 +01:00
orbitcowboy
d08b39c915
Improved const correctness of local variables. There are no functional changes intended. ( #1392 )
2018-09-23 20:24:51 +02:00
Daniel Marjamäki
a25461919c
Rename private member variables
2018-06-17 19:04:06 +02:00
Daniel Marjamäki
965fcf9303
Rename private member variables
2018-06-17 18:55:41 +02:00
Daniel Marjamäki
78974e9267
Rename _type to mType
2018-06-16 20:25:54 +02:00
Daniel Marjamäki
79ffe1d4fc
Rename _tokenizer, _settings, _errorLogger
2018-06-16 16:10:28 +02:00
Daniel Marjamäki
ca8e19c96d
SymbolDatabase: Refactor SymbolDatabase: variable list
2018-04-28 09:38:33 +02:00
Daniel Marjamäki
f336c2efe7
Refactoring; Renamed Scope::classStart and Scope::classEnd
2018-04-27 22:36:30 +02:00
Daniel Marjamäki
b7a52c3811
CheckUnusedVar: Use isLikelyStreamRead
2018-04-22 17:08:23 +02:00
Daniel Marjamäki
c84628c28a
Fixed #8494 (False positive: serialization class overloads operator)
2018-04-17 14:23:04 +02:00
Daniel Marjamäki
e95ff8c7b6
Avoiding emplace
2018-04-14 19:24:35 +02:00
PKEuS
d2146844dd
Refactorizations:
...
- Replace several push_back-calls by emplace_back
- Replace some x = x.substr(0, y) calls by x.erase(y)
2018-04-11 09:44:35 +02:00
Daniel Marjamäki
a0906140a6
Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName.
2018-04-09 06:43:48 +02:00
jrp2014
034296039c
Refactor lib/checkunusedvar.cpp
2018-04-06 08:07:15 +02:00
jrp2014
b6504c70ca
Improve constness
2018-04-04 21:51:31 +02:00
Daniel Marjamäki
7e4dba6a7e
Updated copyright year
2018-03-31 20:59:09 +02:00
Daniel Marjamäki
dbe962ad5d
Compatibility fix for gcc 4.5
2018-03-29 22:00:04 +02:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
b3c80947ed
Fixed #6508 (False positive unusedStructMember - brace initializer)
2017-11-12 22:33:17 +01:00
Ayaz Salikhov
be2c65eb58
Simplify int vs bool
2017-10-08 07:54:39 +02:00
Dmitry-Me
d18e8466a9
Cache and reuse values
2017-09-27 00:51:04 +03:00
Dmitry-Me
2582bbd0f6
Break loop early
2017-08-24 18:10:33 +03:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
Daniel Marjamäki
9ef9d0e4a8
Fixed #8128 (False negative: variable is assigned value that is not read)
2017-08-01 14:56:53 +02:00
Daniel Marjamäki
0a03bbb320
Fixed #6315 (false positive - unreadVariable - variable is used via pointer)
2017-07-23 23:32:14 +02:00
Daniel Marjamäki
ac85b78e2a
Fixed #5619 (false positive: unusedVariable - array accessed by pointer variable only)
2017-07-09 11:19:00 +02:00
Daniel Marjamäki
211d8c6020
Refactoring checking for unused variables (avoid FN when not taking address)
2017-07-01 22:45:51 +02:00
Daniel Marjamäki
d6f066482e
Fixed #6542 (FP: Variable 'lcount' is not assigned a value - using address of integer array)
2017-07-01 11:31:51 +02:00
Daniel Marjamäki
db01ea1408
Fixed #6261 (false positive: Variable used in ternary expression within function argument list)
2017-07-01 11:03:49 +02:00
Daniel Marjamäki
b8ee500d45
Fixed #7092 (Invalid style error: Variable not assigned a value)
2017-06-03 15:31:29 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
PKEuS
b1f4bd7504
Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set ( #7995 )
2017-04-11 11:49:26 +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
Daniel Marjamäki
841e0c2921
Fixed #7546 (Assignment to array element not detected if pointer addition is used)
2017-02-28 22:04:05 +01:00
umanamente
0c1ba8e8b4
( Fixed #7895 ) C++11 brace initialization. Added test. ( #862 )
...
Add an optional extended description…
2017-01-22 10:16:40 +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
Daniel Marjamäki
efa3aba32a
Remove Tokenizer::simplifyNull()
2016-10-18 21:44:02 +02:00
PKEuS
1227a3f596
Improved check: Complain if a variable is modified but not used again
2016-10-10 21:27:40 +02:00
Daniel Marjamäki
ac1a869d60
unused struct members: don't warn about packed structs ( #3088 )
2016-09-05 17:27:12 +02:00
Daniel Marjamäki
60f22bd4ee
Fixed #7477 (False positive 'Assigned value is never used' in multithreaded context)
2016-09-03 20:38:36 +02:00
Roberto Martelloni
28f1222dc2
CWE mapping of useAutoPointerMalloc, uselessCallsCompare, uselessCallsSwap, uselessCallsSubstr, uselessCallsEmpty, uselessCallsRemove, derefInvalidIterator, reademptycontainer, multiplySizeof, divideSizeof, stringLiteralWrite, incorrectStringCompare, literalWithCharPtrCompare, charLiteralWithCharPtrCompare, incorrectStringBooleanError, staticStringCompare, stringCompare, signConversion, truncLongCastAssignment, truncLongCastReturn, unusedFunction, unusedVariable, unusedAllocatedMemory, unreadVariable, unassignedVariable, unusedStructMember, postfixOperator, va_start_wrongParameter ( #824 )
...
Add an optional extended description…
2016-09-03 00:31:35 +02:00
Daniel Marjamäki
9f59bd6dae
Try to fix travis hang
2016-08-02 19:23:45 +02:00
Daniel Marjamäki
f23287544a
Fixed #7196 (Improve check: deem sizeof(thing) as using the thing's members)
2016-08-02 18:50:04 +02:00
Daniel Marjamäki
41526ef3a8
Fixed #6147 (FP unreadVariable: variable assignment in function call argument list)
2016-08-02 08:50:04 +02:00
Daniel Marjamäki
920ac5a3f6
astyle formatting
...
[ci skip]
2016-07-16 21:21:24 +02:00
Roberto Martelloni
25525e38a7
CWE mapping of incorrectStringCompare, literalWithCharPtrCompare, charLiteralWithCharPtrCompare, incorrectStringBooleanError, staticStringCompare, stringCompare, signConversion, unusedFunction, unusedVariable
2016-07-16 10:07:06 +01:00
PKEuS
3bdcf68990
Fixed false positive in CheckUnusedVar::checkFunctionVariableUsage(): Bailout when break; is encountered
...
See also: https://sourceforge.net/p/cppcheck/discussion/general/thread/1c169dc5/
2016-07-07 18:27:31 +02:00
Daniel Marjamäki
54be403f64
Fixed #7026 (Cppcheck does not recognizes the use of a variabile inside lambda function)
2016-05-26 18:07:56 +02:00
PKEuS
cda246da75
Refactorized CheckUnusedVar::checkStructMemberUsage(): Reimplemented check based on symboldatabase
2016-05-25 11:13:31 +02:00
PKEuS
43bf1bb685
Refactorized CheckUnusedVar::checkStructMemberUsage(): Drastically reduced number of Token::findmatch() calls to improve performance
2016-05-24 23:10:39 +02:00
Daniel Marjamäki
7453b641bd
Fixed #4839 (Variable (in array) is assigned a value that is never used)
2016-05-17 16:03:55 +02:00
Daniel Marjamäki
b54613a942
Fixed #7046 (constexpr value used as template parameter reported as not used)
2016-01-31 12:39:43 +01:00
PKEuS
0e8777ec99
Fixed crash on garbage code ( #7356 )
2016-01-31 10:25:09 +01:00
Daniel Marjamäki
f6161c6f89
CheckUnusedVar: My fix for #4955 was a quick fix causing false negatives. Fix some FN and add TODO to handle other FN better.
2016-01-31 09:11:52 +01:00
PKEuS
3b046b42a6
Support function pointers in CheckUnusedVar::checkFunctionVariableUsage_iterateScopes() ( #7194 )
2016-01-30 20:59:55 +01:00
Daniel Marjamäki
fd67ca146d
Fixed #4955 (false positive: Variable 'i' is assigned a value that is never used (only used in template instantiation))
2016-01-30 16:49:39 +01:00
Daniel Marjamäki
95009a4630
Merge pull request #745 from lanurmi/2016_ad
...
Update copyright year to 2007-2016.
2016-01-01 22:57:19 +01:00
Daniel Marjamäki
3bd5a4d10e
CheckUnusedVar: Fix FP when there is class initialization
2016-01-01 16:04:13 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
dea41e2390
CheckUnusedVar: Fix FP for assignment in while
2016-01-01 12:14:18 +01:00
Daniel Marjamäki
350908d0e9
Fix FP in CheckUnusedVar. Caused by #7230 fix.
2015-12-31 15:30:33 +01:00
Daniel Marjamäki
8171154e12
Fixed #7230 (Confusing code snippet in error message)
2015-12-31 01:15:49 +01:00
Daniel Marjamäki
bebf8ccdd5
Revert da15efb3
and 6304a4dd
to fix FPs. See #7148 , #7179 , etc
2015-12-16 14:51:50 +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
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
PKEuS
7866990d04
Fixed false positive with range-based for-loop ( #7075 )
2015-10-27 14:47:18 +01:00
Dmitry-Me
6304a4dddb
Fix FP for members of temporaries
2015-09-25 13:57:11 +03:00
Dmitry-Me
da15efb3f6
Fix FN for distinct structs with identical members
2015-09-24 18:29:08 +02:00
orbitcowboy
fc0786acb0
Merge pull request #686 from Dmitry-Me/omitUnneededActions6
...
Continue early, reuse pattern, better names
2015-09-22 21:31:47 +02:00
Dmitry-Me
0b991f5560
Tell if it's struct or union
2015-09-22 17:38:23 +03:00
Dmitry-Me
ce783483d1
Continue early, reuse pattern, better names
2015-09-22 16:38:49 +03:00
Simon Martin
c78d99dc07
Ticket #6954 : Properly handle pointers to arrays in CheckUnunsedVar.
2015-08-27 23:56:26 +02:00
PKEuS
1627b19dd6
Refactorizations:
...
- Call std::string::find() with char instead of char* where possible
- Avoid string copying
- Optimized several Token::tokAt/strAt calls
2015-08-16 10:33:51 +02:00
PKEuS
4d80df2f4a
Added pointer to Type to Token (similar to Token::Variable() and Token::function()):
...
- Accessible via Token::type()
- Renamed former Token::type() to Token::tokType()
- Removed SymbolDatabase::isClassOrStruct()
2015-08-15 11:19:21 +02:00
Alexander Mai
6e03e7dca2
Remove some code checking for invalid class hierarchy which got obsolete since 480a5672b0
. Run astyle
2015-07-01 07:50:13 +02:00
amai2012
11538c84f6
Refactoring: Distinguish between C and C++ code
...
Refactoring: Replace CheckNonReentrantFunctions::initNonReentrantFunctions by static initialization
2015-06-29 21:17:15 +02:00
Alexander Mai
02a3a01eca
Fix compiler warnings
2015-06-28 18:07:31 +02:00
amai2012
a8db00b4bf
Repair test which had to be adjusted after previous changeset.
...
Refactoring: Add some const
2015-06-16 22:45:33 +02:00
Alexander Mai
5f4902c613
6755 segmentation fault (invalid code) in Token::isAssignmentOp. #6756 segmentation fault (invalid code) in Tokenizer::simplifyTypedef. Fix two crashes.
2015-06-04 17:46:52 +02:00
amai2012
f2d397882f
#6753 segmentation fault (invalid code) in CheckMemoryLeakStructMember::checkStructVariable. #6754 segmentation fault (invalid code) in CheckUnusedVar::checkFunctionVariableUsage_iterateScopes. Trivial fixes to avoid null pointer access
2015-06-03 17:17:53 +02:00
Dmitry-Me
4a75ac58cf
Merge overlapping patterns
2015-03-20 11:06:18 +03:00
PKEuS
b2835051df
Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0.
2015-01-31 12:32:04 +01:00
Thomas Jarosch
a83fe0e268
Check "var" for null pointer before using it
...
Reported by covertey -> amai on IRC.
2015-01-18 13:02:58 +01:00
Thomas Jarosch
fd01cafb1b
Clean up redundant pointer operations
2015-01-17 16:29:50 +01:00
Thomas Jarosch
ef7f104335
Make sure we have a valid Variable pointer before dereferencing it
...
All other call sites check the pointer already.
2015-01-14 23:00:28 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Alexander Mai
ec2c4aa2e3
#6301 Unused shared lock variable. Add exception for std::shared_lock() to CheckUnusedVar::checkFunctionVariableUsage_iterateScopes()
2014-12-07 15:32:09 +01:00
Alexander Mai
d4e59065df
Fix some (clang) compiler warnings
2014-11-20 20:49:05 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00
orbitcowboy
f5d804f71a
running astyle
2014-11-20 10:13:03 +01:00
Alexander Mai
5300ba2074
Make single-argument constructors explicit
2014-11-13 21:39:14 +01:00
PKEuS
936043d47d
Fixed false positive 'unusedVar' with C++11 initialization ( #6160 )
2014-09-30 12:39:27 +02:00
Dmitry-Me
32f7a789df
Merge overlapping patterns, move declarations
2014-09-17 10:54:53 +04:00
Dmitry-Me
7c4b9bed9e
Move declaration, run check earlier
2014-09-16 13:34:16 +04:00
PKEuS
b8918906e6
Fixed false positive #5466
2014-08-31 19:46:30 +02:00
PKEuS
8f4662de92
No unused variable messages about std::unique_ptr|shared_ptr|auto_ptr ( #4355 )
2014-08-31 19:18:02 +02:00
Dmitry-Me
7e442cf75d
Some safe coding. Check that pointer is not null.
2014-08-14 16:10:12 +02:00
PKEuS
adcc8b1634
Implement support for __attribute__((used)) ( #3408 )
2014-08-06 11:13:58 +02:00
PKEuS
f3e0df7501
Support C++11 style initialization with {}:
...
-> Support in setVarId and SymbolDatabase (#4344 )
-> Fixed false positives in unused variable checking (#5491 , #5494 )
Side-effect: Support global variables initialized with brackets (C++03 style) in SymbolDatabase
2014-08-05 15:33:57 +02:00
PKEuS
57c055fcc4
Fixed false negative #5985 : default argument values should not affect variable usage checking.
2014-08-03 19:13:37 +02:00
PKEuS
95afa51b24
Fixed crash #5991 : Don't crash when lambda is incomplete
...
Fixed crash #6004 : Support struct initializations in AST
2014-07-31 23:15:36 +02:00
PKEuS
8c96cc59c9
Fixed false positive #5976 : Properly handle shift from stream.
2014-07-17 10:03:58 +02:00
PKEuS
3d0ebe196b
Several improvements to CheckUnusedVar::checkFunctionVariableUsage_iterateScopes():
...
- Use AST in some places
- Fixed misusage of Token::isStandardType (fixes false negative)
- Removed some redundant conditions
2014-07-02 00:18:40 +02:00
Thomas Jarosch
93341f4449
Use simple match where possible
...
Fixes these warnings found by "--enable=internal":
[lib/checkclass.cpp:972]: (warning) Found simple pattern inside Token::Match() call: "* *"
[lib/checkbufferoverrun.cpp:635]: (warning) Found simple pattern inside Token::Match() call: "."
[lib/checkbufferoverrun.cpp:1397]: (warning) Found simple pattern inside Token::Match() call: ";"
[lib/checksizeof.cpp:299]: (warning) Found simple pattern inside Token::Match() call: "."
[lib/checksizeof.cpp:301]: (warning) Found simple pattern inside Token::Match() call: ")"
[lib/checksizeof.cpp:303]: (warning) Found simple pattern inside Token::Match() call: "]"
[lib/checksizeof.cpp:318]: (warning) Found simple pattern inside Token::Match() call: ")"
[lib/checknullpointer.cpp:413]: (warning) Found simple pattern inside Token::Match() call: "delete"
[lib/checkio.cpp:1336]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkstl.cpp:1509]: (warning) Found simple pattern inside Token::findmatch() call: ";"
[lib/checkstl.cpp:1512]: (warning) Found simple pattern inside Token::findmatch() call: ";"
[lib/checkstl.cpp:1594]: (warning) Found simple pattern inside Token::Match() call: "="
[lib/checkstl.cpp:1598]: (warning) Found simple pattern inside Token::Match() call: "] ="
[lib/checkunusedvar.cpp:755]: (warning) Found simple pattern inside Token::Match() call: "goto"
[lib/checkunusedvar.cpp:793]: (warning) Found simple pattern inside Token::Match() call: "="
[lib/checkuninitvar.cpp:376]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkother.cpp:86]: (warning) Found simple pattern inside Token::Match() call: "> ("
[lib/checkother.cpp:2181]: (warning) Found simple pattern inside Token::Match() call: "> {"
[lib/valueflow.cpp:54]: (warning) Found simple pattern inside Token::Match() call: "&"
[lib/valueflow.cpp:409]: (warning) Found simple pattern inside Token::Match() call: "do"
[lib/valueflow.cpp:425]: (warning) Found simple pattern inside Token::Match() call: ") {"
[lib/valueflow.cpp:487]: (warning) Found simple pattern inside Token::Match() call: ") {"
[lib/valueflow.cpp:511]: (warning) Found simple pattern inside Token::Match() call: "} else {"
[lib/valueflow.cpp:615]: (warning) Found simple pattern inside Token::Match() call: "for ("
[lib/symboldatabase.cpp:80]: (warning) Found simple pattern inside Token::Match() call: "= {"
[lib/symboldatabase.cpp:1069]: (warning) Found simple pattern inside Token::Match() call: "std ::"
[lib/tokenize.cpp:2207]: (warning) Found simple pattern inside Token::Match() call: "< >"
[lib/tokenize.cpp:2730]: (warning) Found simple pattern inside Token::Match() call: ";"
[lib/tokenize.cpp:4234]: (warning) Found simple pattern inside Token::Match() call: "try {"
[lib/tokenize.cpp:4235]: (warning) Found simple pattern inside Token::Match() call: "} catch ("
[lib/tokenize.cpp:5500]: (warning) Found simple pattern inside Token::Match() call: "INT8"
[lib/tokenize.cpp:5752]: (warning) Found simple pattern inside Token::Match() call: "}"
[lib/tokenize.cpp:5752]: (warning) Found simple pattern inside Token::Match() call: "do"
2014-03-14 16:27:47 +01:00
Lauri Nurmi
70a67eaf85
Change some more 0 literals into nullptr.
2014-02-16 13:38:50 +02:00
Daniel Marjamäki
fb5c2d4b48
use nullptr in lib/checkother.cpp
2014-02-15 08:46:28 +01:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Heinrich Schuchardt
6bfd4af5f7
5355: False postive var not assigned
...
Avoid false positive "variable not assigned" for
struct Fred{
};
void foo () {
Fred fred;
throw fred;
}
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2014-02-01 22:40:35 +01:00
Lucas Manuel Rodriguez
ad0269eeeb
Refactor checks using Variable::isStlType()
2014-01-30 01:26:48 -03:00
Heinrich Schuchardt
de20ba6763
[PATCH] Types in isRecordTypeWithoutSideEffects
...
The type definition of the iterator should match the type definition of the map <const Type *, bool>.
2014-01-24 06:10:19 +01:00
Daniel Marjamäki
853d9dd7a9
Fixed #4956 (false positive: Variable 'myIsFirst' is assigned a value that is never used.)
2013-10-26 15:22:28 +02:00
Daniel Marjamäki
3b8e9f5a2a
Fixed #4899 (False positive on unused variable)
2013-09-03 17:02:46 +02:00
Daniel Marjamäki
4a1d1ce1a1
Fixed #3471 (Unused functions: take __attribute__((constructor)) in to consideration)
2013-08-30 06:27:46 +02:00
Daniel Marjamäki
65d99feddf
fix
2013-08-27 15:46:51 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
9c67af058a
SymbolDatabase: Renamed Variable::varId() to Variable::declarationId() to make it more clear how it works.
2013-07-20 12:31:04 +02:00
Frank Zingsheim
395a474ec2
Fixed #4695 : Infinite recursion inside isRecordTypeWithoutSideEffects()
2013-04-01 12:41:14 +02:00
Alexander Mai
7902cd0123
Fixed #4447 (false positive: (style) Variable 'X' is assigned a value that is never used (goto))
2013-03-28 06:44:37 +01:00
Daniel Marjamäki
dd155b57e4
Fixed #4487 (False positive: variable is not assigned a value (pointer alias))
2013-03-20 06:38:53 +01:00
PKEuS
292e52364c
Refactorizations:
...
- Removed empty implementation of CheckUninitVar::runChecks()
- Avoided unnecessary string copying
2013-03-12 08:11:18 -07:00
PKEuS
7bc729bc63
- Moved more functionality from Scope to Type: BaseInfo and FriendInfo
...
- Replaced Scope->findQualifiedScope by SymbolDatabase::findScope
- Improved SymbolDatabase::findType
2013-03-05 06:28:40 -08:00
PKEuS
66a3555897
Implement initial support for Types in Symboldatabase:
...
- For each class/struct/union, a Type instance is added to SymbolDatabase::typeList.
- A scope is no longer created for declared but not defined types
Fixed name detection for classes when they are declared like this: "class ::Foo::Sub {..."
2013-03-05 04:33:38 -08:00
Daniel Marjamäki
78a3a58a5a
Fixed #4628 (False positive: Variable is assigned a value that is never used)
2013-03-04 19:13:49 +01:00
PKEuS
0105f8223c
Simplified several Token::Match/simpleMatch calls when match string consists of a single pattern
...
Fixed two CheckInternal error messages
2013-03-01 03:42:04 -08:00
Daniel Marjamäki
ecafe7a129
Fixed #4624 (Wrong error for instances of std::unique_lock (variable is never used))
2013-02-28 17:02:58 +01:00
Daniel Marjamäki
bce99a9e2f
Fixed #4394 (FP: Variable 'a' is not assigned a value)
2013-02-20 17:43:16 +01:00
Robert Reif
42588e9729
Fixed #4535 (Simplify checks by caching symbol database Variable pointer in Token)
2013-02-06 06:39:58 +01:00
Erik Lax
b538c50856
Fixed #4484 (1.58: new crash for linux kernel code)
2013-01-13 07:57:46 +01:00
Frank Zingsheim
498d03458f
Fixed #4385 : lock_guard RAII throws unreadVariable
2013-01-07 20:28:43 +01:00
Daniel Marjamäki
eebfea2b23
Fixed #4381 (Inline type declaration on statics causes warning)
2013-01-07 19:20:15 +01:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Daniel Marjamäki
dde4cc39e5
astyle formatting
2012-12-29 17:13:54 +01:00
Daniel Marjamäki
e7aa1ec396
Fixed #4411 (Variable is assigned a value that is never used.)
2012-12-29 12:45:37 +01:00
Daniel Marjamäki
1769240e15
Fixed #4022 (false positive: (style) Variable 'sort_entry' is assigned a value that is never used)
2012-12-28 18:18:36 +01:00
acm4me
7da155c8ba
Support for Sun Studio C++ compiler
2012-12-27 11:51:12 +01:00
PKEuS
d82048f5f5
Fixed compiler error in VS10
2012-12-20 04:03:36 -08: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
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
Frank Zingsheim
b99d3f0767
Style change: Fixed #4369 (false positive: Variable 'i' is assigned a value that is never used)
...
based on aebdb3769f
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
dba51c906e
cleanup: removed redundant insideLoop assignment in checkunusedvar. Thank you zingsheim for the suggestion
2012-12-02 07:28:05 +01:00
Frank Zingsheim
f23ce8d254
Fixed #4180 (false positive: (style) Variable is assigned a value that is never used (inside loop))
2012-11-28 06:11:33 +01:00