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
Daniel Marjamäki
35938e74ad
Tokenizer: better handling of 'struct AB ab; sizeof(ab)'
2011-07-16 22:07:30 +02:00
Daniel Marjamäki
cf3ab649fb
Fixed #2873 (segmentation fault of cppcheck while scanning rose-compiler suite)
2011-07-16 19:26:11 +02:00
Daniel Marjamäki
597733bec4
Tokenizer: minor update to handle C# code better
2011-07-16 18:12:55 +02:00
Daniel Marjamäki
35178cc161
Fixed #2912 (false positive: (portability) Assigning an integer (int/long/etc) to a pointer is not portable)
2011-07-16 17:08:03 +02:00
Daniel Marjamäki
c55b0ff651
Fixed #2871 (Define in source not set when -D is used)
2011-07-16 16:59:06 +02:00
Daniel Marjamäki
c299d02dba
astyle formatting
2011-07-16 09:32:35 +02:00
Daniel Marjamäki
07a1222ac6
Preprocessor: fix handling of (1&&2) condition
2011-07-16 09:24:27 +02:00
Daniel Marjamäki
274fd2b985
Tokenizer: Fix minor problem with 'X&&Y'
2011-07-15 19:37:39 +02:00
Daniel Marjamäki
d78d8660ab
astyle formatting
2011-07-15 19:02:16 +02:00
John Smits
7f2d62cbde
Fixed #2882 (One-character token can be mistaken for a multiCompare)
2011-07-15 19:01:36 +02:00
Robert Reif
af1e51f648
fix some more false negatives for #2904 (Memory leak not detected when creating a new class instance)
2011-07-14 20:45:27 -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
66d145ba1c
Fixed #2892 (false positive: (portability) Assigning an address value to the integer (int/long/etc) type is not portable)
2011-07-07 15:14:33 +02:00
Daniel Marjamäki
4055b0ec5f
64-bit portability: fixed two of the TODO test cases. Ticket: #2791
2011-07-06 17:57:39 +02:00
Daniel Marjamäki
827fb01ec1
updated error message about assigning address to integer. Thanks Kimmo for the suggestion.
2011-07-06 12:57:45 +02:00
Daniel Marjamäki
8f0f184058
64-bit checking: Added simple check for assigning pointer address to int/long. Ticket: #2791
2011-07-06 08:55:17 +02: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
Daniel Marjamäki
982b645ff4
Fixed #2775 (Uninitialized variable: Not detected when uninitialized struct pointer is dereferenced in sub function)
2011-07-04 21:04:32 +02:00
Robert Reif
b143b283e9
fix #2886 (crash of cppcheck ( typedef struct x { } ))
2011-07-03 10:50:15 -04:00
Robert Reif
8ec1dfacbf
fix missing pop in Tokenizer::simplifyStructDecl() when anonymous struct/union removed
2011-07-03 08:14:51 -04:00
Robert Reif
b32b2c6d87
add support for checking unused std::string local variables
2011-07-02 19:25:10 -04:00
Robert Reif
3f4cc5fa3a
add class A {} a; -> class A {}; A a; conversion capability to Tokenizer::simplifyStructDecl()
2011-07-02 09:21:30 -04:00
Robert Reif
d447e61b09
fix #2884 (Integer overflow warning in 64-bit build)
2011-07-01 16:59:17 -04:00
Daniel Marjamäki
db4a28d60b
Tokenizer::simplifyGoto: Only simplify the last label in the function. If there are many labels in the same function and all labels are simplified, this function becomes very slow.
2011-07-01 18:07:41 +02: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
Robert Reif
7826b5e22d
add support for detecting unused function variables of type class or struct
2011-06-30 21:58:11 -04:00
Reijo Tomperi
6d4799e0b8
Minor cleanup related to previous fix.
...
This code should not be needed anymore as tokenizer should simplify question mark away.
2011-06-30 22:10:17 +03:00
Reijo Tomperi
89fd5bacf9
Fix #2849 , False positive: memory leak (using question mark operator)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/2849
Simplify: *d = b ? b : a; into if-else
Simplify { ; { ; } } into { ; }
Removed one memleak test which should be redundant now as question marks
should not get into memleak check.
2011-06-30 22:04:26 +03:00
Daniel Marjamäki
6375e1d3dc
Fixed #2849 (False positive: memory leak (using question mark operator))
2011-06-30 17:31:22 +02:00
Robert Reif
77859b9a0f
fix #2878 (derived global class not tokenized properly (class A : ::B { };))
2011-06-30 07:25:36 -04:00
Robert Reif
586fdd24f2
fix #2825 (missing varid on class variables when multiple inheritance is used)
2011-06-29 20:04:04 -04:00
Robert Reif
c99a15516d
fix symbol database derived template class support
2011-06-29 19:52:07 -04:00
Robert Reif
18369ea6ac
add global namespace derived class support
2011-06-29 19:43:39 -04:00
Robert Reif
443dd4c392
partial fix for #2867 handle derived class
2011-06-29 19:39:19 -04:00
Kimmo Varis
7af920a70b
Document that Path::simplifyPath() needs / as separators.
2011-06-29 21:44:53 +03:00
Daniel Marjamäki
d76861270a
Fixed #2797 (Inline suppressions do not handle filenames correctly)
2011-06-29 20:23:39 +02:00
Daniel Marjamäki
cacca00080
Fixed #2855 (False positive: resource leak when reusing fd)
2011-06-29 20:00:21 +02:00
Daniel Marjamäki
e597ad72e7
Fixed #2841 (False positive: Array index out of bounds, can't compare ints to chars)
2011-06-29 18:44:05 +02:00
Robert Reif
6eecab5d73
fix #2807 (Wrong handling of function references when prefixed with &)
2011-06-29 07:19:34 -04:00
Robert Reif
1286898fa0
fix #2864 (--errorlist missing errors: variableHidingTypedef and Extra qualification)
2011-06-28 21:46:54 -04:00
Robert Reif
f403de7bad
partial fix for #2867 Tokenizer::removeRedundantAssignment didn't understand function local class and removed class variable
2011-06-28 19:48:28 -04:00
Robert Reif
70a32fc245
fix #2875 (segmentation fault of cppcheck ( 0; (a) < (a) ))
2011-06-28 18:47:18 -04:00
Robert Reif
272eb445fb
fix #2865 (segmentation fault of cppcheck ( char a[1] ))
2011-06-27 07:31:10 -04:00