Robert Reif
735ff11469
fix #3110 (false positve: style) Boolean result is used in bitwise operation. Clarify expression with parentheses)
2011-09-12 07:32:55 -04:00
Daniel Marjamäki
55230baf78
Fixed #3086 (false positive: Boolean result is used in bitwise operation.)
2011-09-11 09:46:01 +02:00
Philipp Kloke
2f62d180fe
Fixed #1740 (Undefined Behavior: Divide by zero)
2011-09-10 16:12:53 +02:00
seb777
074ad10a30
fix #195 Unusual shift operation - check this kind of code
...
return x >> ! y ? 8 : 2;
2011-09-06 22:37:19 +02:00
Robert Reif
b27bbea44a
really fix #3079 (Spelling error in unsigned variable check 'never alwayw')
2011-09-05 09:48:59 -04:00
Robert Reif
2250a2dfc3
fix #3079 (Spelling error in unsigned variable check 'never alwayw')
2011-09-05 09:04:27 -04:00
seb777
5c7ed46e0c
Following the discussion XX, replace the keyword C99 '_Bool' with the 'bool' keyword in the process of tokenization\nSee f29b7f9f08
2011-09-03 23:15:33 +02:00
Daniel Marjamäki
d23c58d387
enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074
2011-09-03 15:30:30 +02:00
Robert Reif
f29b7f9f08
fix #3062 (false negative: Boolean variable is used in bitwise operation)
2011-09-02 17:19:06 -04: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
Robert Reif
eda9ff6fc5
refactor checkother to move error messages to follow check and rename some error functions to end in Error
2011-08-19 11:53:43 -04: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
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
0d7c80ef21
improved comment of previous commit
2011-08-19 07:28:15 +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
4f962acf16
Fixed #3009 (Using numeric constants in kernel space code)
2011-08-16 20:16:33 +02:00
Robert Reif
ad45ba718c
convert CheckOther::checkCharVariable() to use symbol database
2011-08-14 10:39:45 -04:00
Robert Reif
cd2c0fd9c8
convert CheckOther::checkSizeofForNumericParameter() to use the symbol database
2011-08-14 10:21:07 -04:00
Robert Reif
741eabba16
convert CheckOther::checkIncrementBoolean() to use the symbol database
2011-08-14 10:16:39 -04: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
8a6a999f09
Fixed #2979 (Improve message: using char as array index)
2011-08-08 19:35:11 +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
Moritz Lipp
8d68981119
Fixed #2793 (SIGABRT on filenames without file extension)
2011-07-31 18:35:28 +02:00
Robert Reif
2f4aee2923
fix missing else in patch that added support for unused const local variables
2011-07-30 07:16:59 -04:00
Robert Reif
cb4282d69a
use simpleMatch where possible in checkother.cpp
2011-07-29 22:37:05 -04:00
Daniel Marjamäki
dc629b4c39
Fixed 'possible null pointer dereference' warning messages
2011-07-28 08:12:21 +02:00
Daniel Marjamäki
d2c0e5e7e6
Fixed #2821 (New Check : bool pointer null truth assignment)
2011-07-28 07:28:24 +02:00
Robert Reif
9a4447c835
add support for unused const local variables
2011-07-24 12:09:59 -04:00
Simon Martin
539c2e5acb
Fixed #2932 (segmentation fault of cppcheck ( i / i ))
2011-07-24 09:06:38 +02:00
Robert Reif
c3c3eb74e8
fix #2929 (Additional Unused variable check)
2011-07-21 18:37:37 -04:00
Robert Reif
ed30edf9d3
simplify CheckOther::checkIncorrectLogicOperator() by using more pattern matching
2011-07-18 07:34:49 -04:00
Robert Reif
76d0872c0d
made #2827 fix more generic by adding more ops and using pattern matching rather than string matching
2011-07-17 16:28:00 -04:00
Robert Reif
4149617978
fix #2827 to use numeric comparisons
2011-07-16 23:05:35 -04:00
Robert Reif
430d22032d
fix #2827 condition always false or true)
2011-07-16 22:06:23 -04:00
Zachary Blair
997a3652d2
Fixed #2822 (New check: Duplicate break statements in switch)
2011-07-14 17:12:56 -07:00
Robert Reif
270b2b1772
fix #2904 (Memory leak not detected when creating a new class instance)
2011-07-14 19:15:59 -04:00
Daniel Marjamäki
0007351ef4
spell check of error message. contant => constant
2011-07-05 19:59:58 +02:00
Daniel Marjamäki
8cd2c3115e
Fixed #2866 (Detect sign extension bugs)
2011-07-05 18:41:27 +02:00
Greg Hewgill
657b003dc8
Fix spelling error in warning identifier
2011-07-05 19:54:23 +12:00
Robert Reif
b32b2c6d87
add support for checking unused std::string local variables
2011-07-02 19:25:10 -04:00
Robert Reif
301e59cea0
fix false positive for unused local class/struct variable
2011-07-01 08:45:29 -04:00
Robert Reif
18e6509c5d
add support in CheckOther::functionVariableUsage() for checking structures that are declared with struct keyword
2011-07-01 07:42:20 -04:00
Robert Reif
3225c9dd9b
cleanup isStatic in CheckOther::functionVariableUsage()
2011-07-01 07:15:59 -04:00