Daniel Marjamäki
4e121c94ab
some more comments
2010-10-15 18:37:48 +02:00
Daniel Marjamäki
d182079c5e
added comments in CheckStl
2010-10-15 18:21:53 +02:00
Daniel Marjamäki
0b6948a805
Fixed #2101 (list in vector iterator usage)
2010-10-15 18:11:41 +02:00
Daniel Marjamäki
ba2b986ece
Fixed #2097 (false positive: buffer access out of bounds)
2010-10-14 20:00:32 +02:00
Daniel Marjamäki
e11d9f1628
astyle formatting
2010-10-14 19:59:10 +02:00
Debrard Sebastien
fb928b6778
Fixed #2018 (Postfix Operators)
2010-10-14 19:17:40 +02:00
Daniel Marjamäki
b6c995ea47
Fixed #2096 (False positive: buffer overrun (extern array))
2010-10-13 20:57:59 +02:00
Robert Reif
267d1f273e
Fixed #2082 (Tokenizer::simplifyTypedef: wrong handling of array)
2010-10-13 20:02:37 +02:00
Daniel Marjamäki
229604b3e3
Fixed #2093 (False positive: buffer access out of bounds (unknown type))
2010-10-13 18:06:50 +02:00
Pete Johns
afe52fa9f2
Fixed MSVC++ compiler warning (pointers are not bools)
2010-10-13 21:19:18 +11:00
Pete Johns
52e16454fa
Removed redundant code.
...
localClassDefinition is no longer required due to improved isIdentifierObjectType() in commit fbd3d92
.
2010-10-13 20:48:37 +11:00
Pete Johns
fbd3d92aa9
Fixed #2084 (False positive: object destroyed immediately (struct and function with same name))
...
Tightened up class definition matching so as not to match C-style struct tags.
2010-10-13 20:37:53 +11:00
Robert Reif
a58094e827
Fixed #2089 (False negative: Function can be const (calling const function))
2010-10-13 07:26:41 +02:00
Daniel Marjamäki
2334192bff
Fixed #2087 (False positive: Array 'str[1]' index 1 out of bounds)
2010-10-12 21:52:02 +02:00
Debrard Sebastien
d0629803a9
warning de compilation
2010-10-12 19:57:17 +02:00
Debrard Sebastien
3273f964c8
comment
2010-10-12 19:56:35 +02:00
Debrard Sebastien
1a4e3dcc44
increment check
2010-10-12 19:54:39 +02:00
Daniel Marjamäki
9e15c4ef38
Fixed #2088 ([test.c:12]: (error) Buffer access out-of-bounds: l)
2010-10-12 19:35:20 +02:00
Robert Reif
907ed0ac6f
Fixed #2085 (False negative: function can be const when member variable is compared)
2010-10-12 07:57:09 +02:00
Daniel Marjamäki
74bf1821e6
Array index: detect array index out of bounds when datatype is unknown. Ticket: #2086
2010-10-11 20:52:14 +02:00
Daniel Marjamäki
3dfcbfc0e0
assignment in assert: modified the error message to better explain the reason why the warning is given.
2010-10-11 17:59:08 +02:00
Robert Reif
a6e915f0cd
Fixed #2081 (false negative: the function can be declared as const)
2010-10-11 17:43:36 +02:00
Zachary Blair
d9967d4fd2
Fixed #2079 (detect side effects in assert)
2010-10-10 13:05:06 -07:00
Daniel Marjamäki
81aed3fbd7
Tokenize: Fixed bug in Tokenize::simplifyKnownVariables
2010-10-10 19:27:42 +02:00
Daniel Marjamäki
ef4ce6f46b
STL: fixed false positives in the new double-increment check when iterator shadows outer iterator
2010-10-10 14:28:14 +02:00
Daniel Marjamäki
5cc7c9dcf7
Parameter passed by value: updated error message so it mentions the reason.
2010-10-10 14:12:11 +02:00
Daniel Marjamäki
ae0528ef59
STL: fixed false positives for the new double-increment check
2010-10-10 11:22:44 +02:00
Daniel Marjamäki
835b511bee
STL: Added double-increment check.
2010-10-10 10:52:41 +02:00
Daniel Marjamäki
a73ada54d5
Fixed #1705 (false negative: access past end of buffer)
2010-10-10 09:15:18 +02:00
Daniel Marjamäki
14f12e0647
Fixed #2078 (false negative: member variable not intialized)
2010-10-10 07:57:26 +02:00
Daniel Marjamäki
a3367874d9
Fixed #1778 (false negative: nullpointer dereference (std::string pointer))
2010-10-09 07:57:34 +02:00
Daniel Marjamäki
068317bed1
STL: Fixed TODO test case TestStl::erase5
2010-10-09 07:15:34 +02:00
Daniel Marjamäki
e0ba626351
ClassInfo: Removed unused functionality
2010-10-08 19:43:41 +02:00
Robert Reif
02027eb750
Fixed #2074 ('Internal error in Cppcheck' on complex function typedef (even 2 typedefs!))
2010-10-06 05:43:07 +02:00
Daniel Marjamäki
7b4e08385d
STL: refactoring CheckStl::erase so ExecutionPath is used
2010-10-05 20:54:13 +02:00
Pete Johns
4e11e71a21
Fixed 2072 (object destroyed immediately: add --doc info)
2010-10-04 08:54:19 +11:00
Pete Johns
4bf9ff26ea
Fixed 2071 (false positive: object destroyed immediately (when using '= { ... }'))
...
Simplified check within CheckOther::checkMisusedScopedObject() as a result.
2010-10-04 08:16:11 +11:00
Daniel Marjamäki
cd8ef1cded
Revert "temporarily disable the 'object destroyed immediately' message"
...
This reverts commit fa94312c9a
.
2010-10-03 18:05:08 +02:00
Daniel Marjamäki
5bf2a300d9
1.45: updated version information
2010-10-03 17:05:36 +02:00
Daniel Marjamäki
fa94312c9a
temporarily disable the 'object destroyed immediately' message
2010-10-03 16:59:13 +02:00
Pete Johns
78795dc3ac
Fix false positive: Misused Scope Object does not pick constructors of local class declarations.
...
It does pick up if there is an unused construction within the function, though.
2010-10-02 22:59:04 +10:00
Daniel Marjamäki
e4c3b390cc
Fixed #2069 (cppcheck fails to scan OpenBSDs ftp source code)
2010-10-02 13:28:44 +02:00
Pete Johns
365b1bed1a
Fixed false positive: checkMisusedScopedObject no longer errors on calls to function objects.
2010-10-02 21:25:16 +10:00
Pete Johns
9a9302cba1
Prevent Tokenizer::simplifyCalculations() from removing parantheses from calls to Functors.
2010-10-02 21:19:05 +10:00
Pete Johns
b72b699b76
Fixed false-positive: Object is referenced on construction
...
struct Foo {
void bar() {
}
};
void fn() {
Foo().bar(); // This caused a false-positive
}
2010-10-02 20:26:29 +10:00
Pete Johns
3f72d3a877
Check misused scope object does not pick local class method.
...
Also fixed mistyped withinFuntion ->withinFunction.
2010-10-02 20:12:52 +10:00
Pete Johns
0017655f55
Added test for functor false-positive [passing]
...
Also removed typedef's following danmar's review and renamed isClassresults -> isClassResults to make more clear.
2010-10-02 18:45:24 +10:00
Pete Johns
6e0ef3eda2
Fixed #1132 (Detection of misused scope objects in functions)
...
Emits error in the form:
[useless_lock.cpp:18]: (error) instance of "Lock" object destroyed immediately
...if an instance of a class or struct is unnamed and therefore destroyed
straight after creation.
Only checks for misused scope objects within functions.
Optimised isIdentifierObjectType() by memoizing.
2010-10-02 14:22:26 +10:00
Pete Johns
50c2fa9ab0
Revert "Fixed #1132 (Detection of misused scope objects)"
...
This reverts commit c6acdccfa0
.
2010-10-01 20:52:16 +10:00
Pete Johns
c6acdccfa0
Fixed #1132 (Detection of misused scope objects)
...
Emits error in the form:
[useless_lock.cpp:18]: (error) instance of "Lock" object destroyed immediately
...if an instance of a class or struct is unnamed and therefore destroyed
straight after creation.
Removed "internal error" from token.cpp, since in this case varid would be NULL.
2010-10-01 20:30:21 +10:00