Daniel Marjamäki
8a28a63e68
Merge commit 'elfring/2679d'
2011-04-02 14:16:14 +02:00
Markus Elfring
8cde24597f
Determination of rule support in CMake scripts (bug #2679 , #2524 )
...
The support for check rules will be automatically included in the generated
software if build settings were accordingly selected for PCRE.
https://sourceforge.net/apps/trac/cppcheck/ticket/2679
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2011-04-02 13:25:18 +02:00
Daniel Marjamäki
ea57e10c7f
Tokenizer::simplifyCalculations: simplify division result if it's a whole number, even though it doesn't have precedence
2011-04-02 12:52:11 +02:00
Daniel Marjamäki
855b01cd5a
Clarify precedence 'a*b?c:d' : warn for addition, subtraction and division also. tried to clarify the message more
2011-04-02 11:43:20 +02:00
Daniel Marjamäki
f34e9e6623
Tokenizer: better simplification of calculations in conditions
2011-04-02 11:08:58 +02:00
Robert Reif
64fa7bf8d4
symbol database: add support for anonymous struct and union
2011-03-31 20:54:23 -04:00
Robert Reif
a39444a40f
change CheckClass::operatorEqToSelf to make better use of the symbol database
2011-03-31 19:53:35 -04:00
Robert Reif
cf65a73c47
fix CheckClass::operatorEq to check return type more closely (to match check description)
2011-03-31 19:40:28 -04:00
Daniel Marjamäki
0dbf5c6151
fixed doxygen warnings about undocumented function parameters
2011-03-31 19:16:43 +02:00
Robert Reif
faaff942d2
symbol database: improve function argument count and default argument count
2011-03-30 21:59:43 -04:00
Robert Reif
d17a204096
symbol database: get function argument count using argument list size rather than counting commas
2011-03-30 21:14:24 -04:00
Daniel Marjamäki
b8cda19ca6
Fixed #2655 (false positive: (warning) Redundant code: Found a statement that begins with numeric constant)
2011-03-30 21:57:01 +02:00
Lieven de Cock
97328f08de
Improve/cleanup Path::removeQuotationMarks().
2011-03-30 21:46:41 +03:00
Daniel Marjamäki
ae2a8d839b
Fixed #2693 (__declspec attribute not removed properly)
2011-03-30 19:49:55 +02:00
Stefan Weil
675e63b6a7
Spell checks
2011-03-30 16:45:31 +02:00
Stefan Weil
0e4cf7a2d6
Spell checks
2011-03-30 16:44:16 +02:00
Robert Reif
ce934f03a4
symbol database: handle default values for function arguments properly
2011-03-29 23:16:13 -04:00
Robert Reif
9612573d8e
add support for array of unnamed struct and union to symbol database
2011-03-29 19:48:12 -04:00
Kimmo Varis
4d4b28b075
Remove './' at begin of path in Path::simplifyPath.
...
The './' is not needed at begin of path for files we check. And it
only makes paths longer. This also makes it easier to match paths.
2011-03-29 20:53:18 +03:00
Daniel Marjamäki
0a2f11c2cd
Fixed #2695 (False positive: null pointer dereference and ternary operator (?:))
2011-03-29 18:45:32 +02:00
Robert Reif
b31da161a7
more support for anonymous struct to symbol database
2011-03-29 07:47:39 -04:00
Robert Reif
678486f0db
add support for anonymous struct to symbol database
2011-03-29 07:08:59 -04:00
Robert Reif
e9a23d9cb5
fix #2692 (False positive: if parsed as function in operator >>)
2011-03-28 20:02:06 -04:00
Robert Reif
1aca09a8bf
add support for checking struct/class member container in CheckStl::size()
2011-03-28 19:31:23 -04:00
Kimmo Varis
b889f663ae
Add Path::removeQuotationMarks() to clean path.
2011-03-28 22:14:19 +03:00
Daniel Marjamäki
a1dba61cee
Null pointer: prefer longer error message that says 'otherwise condition at line X is redundant'
2011-03-28 18:48:27 +02:00
Daniel Marjamäki
7426bd3daf
Null pointer: prefer longer error message that says 'otherwise condition at line X is redundant'
2011-03-28 18:44:25 +02:00
Daniel Marjamäki
4a7b60942b
Fixed #2691 (False positive: struct dereference and check (switch-break))
2011-03-28 17:28:21 +02:00
Robert Reif
31f8ff723b
skip nested anonymous unions when searching for variables in symbol database
2011-03-27 18:37:31 -04:00
Daniel Marjamäki
57056bcf61
Fixed #2689 (False positive: Possible null pointer dereference)
2011-03-27 21:29:49 +02:00
Robert Reif
dd5e15b40c
output a debug message when a member variable is used that has a varid of 0
2011-03-27 14:27:14 -04:00
Robert Reif
1e1434e191
make member variable change detection simpler and more accurate for CheckClass::checkConst
2011-03-27 13:59:12 -04:00
Robert Reif
20853fe273
add anonymous union support to the symbol database
2011-03-27 13:48:41 -04:00
Daniel Marjamäki
c87037c29d
Fixed #2674 (False positive: possible null pointer dereference (check if pointer is null in one function, dereference it in another function))
2011-03-27 11:04:58 +02:00
Daniel Marjamäki
e89f6d6ec0
Fixed #2660 (False positive: Variable 'v' is assigned a value that is never used)
2011-03-27 08:19:09 +02:00
Daniel Marjamäki
3c2d3ca3a4
Fixed #2653 (segmentation fault of cppcheck 'x=b=0;')
2011-03-26 12:20:23 +01:00
Daniel Marjamäki
7d9872a134
Tokenizer::setVarId: Prevent that wrong varid is given when uncertain. Ticket: #2680
2011-03-26 10:05:07 +01:00
Daniel Marjamäki
0ff5320d19
CMake: There is no need for PCRE when building the lib
2011-03-26 09:33:21 +01:00
Daniel Marjamäki
2b1277aa64
Fixed #2680 (setVarId: variables with class qualification don't get varid)
2011-03-26 08:56:41 +01:00
Robert Reif
c27ecf5aeb
only break when we know we are inc/dec a member variable in CheckClass::checkConstFunc
2011-03-25 23:22:28 -04:00
Robert Reif
168db82fd6
better checking of assignment to array element in CheckClass::checkConstFunc
2011-03-25 23:02:13 -04:00
Robert Reif
f8e1735b0f
add support to CheckClass::checkConstFunc for ++/-- array elements
2011-03-25 22:37:32 -04:00
Robert Reif
ca50bc7850
move 2 CheckClass helper functions to follow externally called functions so code matches comments
2011-03-25 22:21:40 -04:00
Markus Elfring
9301ee28a8
Added CMake files
2011-03-25 07:14:53 +01:00
Robert Reif
710eb8ffd9
add support for global namespace to Tokenizer::simplifyVarDecl()
2011-03-24 23:06:20 -04:00
Robert Reif
fc258164cd
fix #2675 (false positive: syntax error)
2011-03-24 22:26:42 -04:00
Robert Reif
d643918761
symbol database: add a link from a Function to its Function Scope namd make function parameters belong to Function Scope
2011-03-24 22:08:18 -04:00
Daniel Marjamäki
74105f5d83
Fixed #2673 (false positive: memory leak (address stored in list))
2011-03-24 17:14:12 +01:00
Robert Reif
61e720c82b
fix #1288 (Use of memset on struct - nested structs not handled)
2011-03-23 21:58:58 -04:00
Robert Reif
cbc81e20f5
fix Tokenizer::simplifyVarDecl() template assignment
2011-03-23 21:15:49 -04:00