Robert Reif
7eb43bc107
partial fix for #3030 (Improve check: Returning pointer to local array variable with '&' pointer operator)
2011-08-20 15:08:30 -04:00
Daniel Marjamäki
27b29e5b8e
Fixed #3023 (False positive: no possible null pointer dereference here: 'WARN_ON(!abc || abc->x == 0);')
2011-08-20 09:47:55 +02:00
Daniel Marjamäki
dd09b24208
Fixed #3024 (False positive: memory leak for 'rc.bitmap' when rc is added to linux kernel list)
2011-08-20 09:17:34 +02:00
Kimmo Varis
57e3a4a34b
Update test project VS project files.
...
Ticket: #3025 (Visual Studio projects needs updating for new lib/checkunusedvar files)
2011-08-19 22:47:13 +03:00
Kimmo Varis
385a569ff2
Rename Test VC project files.
...
When the target name of the test runner binary changed to 'testrunner'
also the filenames of the generated project files changed.
2011-08-19 22:44:32 +03:00
Robert Reif
2dd93dff75
move unused variable checks from checkother to checkunusedvar
2011-08-19 14:35:25 -04:00
Robert Reif
9fbef3ca7b
fix #3011 (new check: when first comparison is true, the 2nd comparison is always true)
2011-08-19 13:28:37 -04:00
Daniel Marjamäki
a735790e77
using boolean result in bitwise operation. fix false positive for '.. != (char *) &x'
2011-08-19 18:55:20 +02:00
Daniel Marjamäki
2dd1e290eb
fixed false positives for the 'bitwise operator / comparison operator' check
2011-08-19 18:06:28 +02:00
Daniel Marjamäki
314d5f1e79
fixed false positive for 'using bitwise operation on boolean result'
2011-08-19 17:07:26 +02:00
Daniel Marjamäki
72b01d1ca0
Improve check: Tweaked the assignAndCompare to handle | also in addition to &
2011-08-19 16:10:09 +02:00
Daniel Marjamäki
c107fdd2d4
Fixed #3018 (false positive: (style) Suspicious condition (assignment+comparison), it can be clarified with parentheses)
2011-08-19 13:54:06 +02:00
Daniel Marjamäki
40b493e621
Improve check: Clarify condition (using boolean result in bitwise operation)
2011-08-19 13:40:54 +02:00
Daniel Marjamäki
4606251ce8
Fixed #3001 (False Positive: Redundant assignment to itself)
2011-08-19 07:23:11 +02:00
Daniel Marjamäki
e5ff920ea9
Suspicious condition: Better handling when rhs is non-numeric
2011-08-19 00:56:15 +02:00
Daniel Marjamäki
a7728fef48
New check: warn about such suspicious conditions: '(a & b == c)'
2011-08-19 00:15:20 +02:00
Daniel Marjamäki
afed93d7d6
Command line: Added --std option. Right now only --std=posix is possible but other options might be added later.
2011-08-17 20:08:55 +02:00
Robert Reif
88019658b4
fix #3013 (segmentation fault of cppcheck ( struct x : virtual y ))
2011-08-16 19:16:58 -04:00
Daniel Marjamäki
5f25f2c6e6
Fixed #3012 (False Pos Memory Leak with a Macro)
2011-08-16 20:39:17 +02:00
Daniel Marjamäki
4f962acf16
Fixed #3009 (Using numeric constants in kernel space code)
2011-08-16 20:16:33 +02:00
Robert Reif
a6c5eff1be
fix #3006 (segmentation fault of cppcheck ( x < () < ))
2011-08-15 07:19:49 -04:00
Robert Reif
4168d79b09
fix #3005 (segmentation fault of cppcheck ( enum : x ))
2011-08-15 07:07:12 -04:00
Robert Reif
5364b4f7fb
fix #3007 (false positive: (style) Struct 'Fred' hides typedef with same name)
2011-08-15 06:56:15 -04:00
Robert Reif
ed507b73ee
fix #3004 (false positive: (style) Struct 'Fred' hides typedef with same name)
2011-08-14 21:00:05 -04:00
Robert Reif
08e9d64a86
fix #3003 (segmentation fault of cppcheck (typedef a x[]; y = x ))
2011-08-14 20:38:16 -04:00
Robert Reif
b7f42535ec
fix #3000 (false positive: (style) Struct 'Fred' hides typedef with same name)
2011-08-14 18:50:33 -04:00
Robert Reif
389ab80b63
fix #2999 (false positive: (style) Struct 'Fred' hides typedef with same name)
2011-08-14 18:06:05 -04:00
Daniel Marjamäki
01b9c0707d
Settings: Removed the --enable=posix option. Ticket: #2949
2011-08-14 09:45:53 +02:00
Robert Reif
ce00d0d35e
fix #2963 (FP: Typedef names considered duplicate because __LINE__ not expanded)
2011-08-11 18:18:47 -04:00
Robert Reif
f7b9d4d726
fix #2991 (segmentation fault of cppcheck ( ::y(){x} ))
2011-08-11 17:57:54 -04:00
Kimmo Varis
a71ce607a4
Tests: Re-enable style param for testdivision.
...
My earlier commit (cfcfa3f0
) removed the use of style parameter.
This commit adds it back.
Ticket: #2987 (GCC: warning: unused parameter ‘style’ in test/testdivision.cpp:39:10)
2011-08-10 23:46:26 +03:00
Daniel Marjamäki
9a24492a00
Fixed #2975 (False positive: Return of the address of an auto-variable)
2011-08-10 18:16:31 +02:00
Robert Reif
a30da73d3e
fix #2986 (segmentation fault of cppcheck ( x[y] ))
2011-08-09 19:45:18 -04:00
Robert Reif
10eb224ac7
fix #2983 (segmentation fault of cppcheck)
2011-08-09 18:31:02 -04:00
Daniel Marjamäki
2b8b0c44b2
Fixed #2969 (False positive: assign address of auto-var to function parameter, when function parameter is reassigned later)
2011-08-09 18:24:39 +02:00
Daniel Marjamäki
003956e42e
Fixed #2982 (false positive: using char type as array index (using string as key))
2011-08-09 17:03:22 +02:00
Daniel Marjamäki
2150995475
Fixed #2981 (False positive: struct member leak)
2011-08-08 19:58:49 +02:00
Daniel Marjamäki
8a6a999f09
Fixed #2979 (Improve message: using char as array index)
2011-08-08 19:35:11 +02:00
Daniel Marjamäki
e2367b4149
Fixed #2976 (False positive: array out of bounds)
2011-08-08 18:22:15 +02:00
Robert Reif
afe95be966
fix #2980 (segmentation fault of cppcheck)
2011-08-08 06:58:55 -04:00
Robert Reif
403b508371
Merge branch 'master' of github.com:danmar/cppcheck
2011-08-07 16:49:07 -04:00
Robert Reif
829611b129
fix #2978 (segmentation fault of cppcheck ( enum E {} e enum ))
2011-08-07 16:48:47 -04:00
Daniel Marjamäki
999b80bbb8
Buffer overrun: Fix false negative
2011-08-07 17:54:25 +02:00
Daniel Marjamäki
a6a966e28e
Null pointer: Fixed false positive when condition contains assignment 'if (p==NULL && (p=malloc(10))!=NULL) *p=0;'
2011-08-07 17:06:25 +02:00
Kimmo Varis
cfcfa3f000
Use "enabled" list for the style checking.
...
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.
Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00
Robert Reif
85b2bd21dc
fix #2968 (new check: testing if unsigned variable is less than 0)
2011-08-06 19:23:09 -04:00
Robert Reif
222ed6d375
fix #2971 (Wrong warning generated)
2011-08-06 19:10:15 -04:00
Robert Reif
d23fb873cc
fix #2970 (Incorrect report: Class does not have a constructor)
2011-08-06 17:54:02 -04:00
Robert Reif
3bd8bf0e75
run astyle
2011-08-06 17:53:06 -04:00
Kimmo Varis
babfba53fb
Tests: Disable tests for CLI -i option.
...
The tests use non-existing relative paths. Currently the code
checks if the paths added to -i exist and hence these tests
fail.
2011-08-06 19:18:20 +03:00