Daniel Marjamäki
a605bdc8a2
Fixed #2195 (unit tests failing)
2010-11-12 15:43:16 +01:00
Daniel Marjamäki
ba7a3b376e
Fixed #2167 (Drop linefeeds from error messages)
2010-11-11 19:54:43 +01:00
Daniel Marjamäki
0328d26fcb
Fixed #2192 (false positive: resource leak)
2010-11-11 17:40:20 +01:00
Robert Reif
07f4067fa8
typedef: better handling of __typeof__
2010-11-11 17:02:04 +01:00
Robert Reif
a09c221014
typedefs: handle __typeof__
2010-11-11 06:40:49 +01:00
Daniel Marjamäki
624ce205b9
Fixed #2185 (False negative: when constant is undefined a 'dangerous usage of strncpy' is not found)
2010-11-10 20:20:05 +01:00
Daniel Marjamäki
41bbe5d0cf
Fixed #2182 (Context sensitive false positive)
2010-11-10 18:24:40 +01:00
Daniel Marjamäki
28c53cabea
Fixed #2184 (False Positive: memory leak)
2010-11-10 17:46:40 +01:00
Robert Reif
4ddf6f3b44
Symbol database: code cleanups
2010-11-10 16:52:52 +01:00
Daniel Marjamäki
2102b9598e
FileLister: fixed compiler errors in win32. accept all files given by user.
2010-11-09 19:32:11 +01:00
Daniel Marjamäki
14bf9fbbdb
Fixed #2181 (How can I select the extension of the files to check?)
2010-11-09 19:20:31 +01:00
Daniel Marjamäki
81cac166d6
FileLister: minor cleanup
2010-11-09 19:11:43 +01:00
Daniel Marjamäki
508c171945
Symbol database: add support for class inline functions with classes
2010-11-09 17:06:07 +01:00
Robert Reif
36b03bdd3e
Fixed #2179 (Segmentation fault in assignment operator)
2010-11-09 06:58:19 +01:00
Daniel Marjamäki
c2bf3647a4
Fixed #2178 (segmentation fault of cppcheck)
2010-11-08 19:47:19 +01:00
Daniel Marjamäki
6a4f70e496
Fixed #2169 (Inline suppression does not work unless filename is given)
2010-11-08 18:53:48 +01:00
Daniel Marjamäki
21ec772e31
Tokenizer: Only show 'failed to instantiate template' debug messages if the --debug-warnings has been given
2010-11-08 18:01:28 +01:00
Daniel Marjamäki
27b7638901
Visual Studio: Fixed compiler warnings about assignment in condition
2010-11-08 17:29:08 +01:00
Robert Reif
23b50a3d81
Symbol database: delay finding class variables until after all classes have been found.
2010-11-08 17:12:25 +01:00
Daniel Marjamäki
586f4992d8
Tokenizer::simplifyKnownVariables: Fixed TODO test cases in TestBufferOverrun
2010-11-07 17:42:32 +01:00
Daniel Marjamäki
47e9fcb5a8
Revert "Tokenizer: More specific bailout in simplifyKnownVariables for loop variable"
...
This reverts commit 7e9bb62dff
.
2010-11-07 17:40:27 +01:00
Daniel Marjamäki
7e9bb62dff
Tokenizer: More specific bailout in simplifyKnownVariables for loop variable
2010-11-07 17:20:03 +01:00
Daniel Marjamäki
cd94fa89e0
Tokenizer: More specific bail outs in simplifyKnownVariables
2010-11-07 11:07:56 +01:00
Daniel Marjamäki
b881718d9f
Tokenizer: better bailout in simplifyKnownVariables when there is loop
2010-11-07 10:42:08 +01:00
Daniel Marjamäki
fb068a4e71
Fixed #2170 (false positive: After a strncpy() the buffer should be zero-terminated)
2010-11-07 09:37:45 +01:00
Daniel Marjamäki
bd2b1b2914
Tokenizer: better handling of const variables
2010-11-07 08:43:30 +01:00
Daniel Marjamäki
25391cb562
Tokenizer: Bailout simplifyKnownVariables for loop variables
2010-11-07 08:10:09 +01:00
Robert Reif
662cd27f87
Symbol database: fixed problem
2010-11-06 20:27:12 +01:00
Daniel Marjamäki
2833a5ebb5
Tokenizer: Refactoring the simplifyKnownVariable
2010-11-06 20:23:49 +01:00
Daniel Marjamäki
5be12a1d27
Tokenizer: improved simplifyKnownVariables
2010-11-06 19:43:32 +01:00
Daniel Marjamäki
53fc0ca5e6
Tokenizer: Refactoring. Merged two patterns into one pattern.
2010-11-06 15:55:37 +01:00
Daniel Marjamäki
afcc28e9ee
Tokenizer: Added debug warning that is shown when bailing out in simplifyKnownVariables
2010-11-06 15:42:41 +01:00
Robert Reif
8a379d4826
Fixed #2176 (Tokenizer::simplifyTypedef function pointer bug)
2010-11-06 15:15:50 +01:00
Robert Reif
0205498a12
Symbol database: improved handling of out of line functions returning function pointers
2010-11-06 13:31:56 +01:00
Robert Reif
c49a8a99a3
Fixed #2175 (Tokenizer::simplifyTypedef : wrong simplification of 'typedef float vec_t[3];')
2010-11-06 13:28:44 +01:00
Daniel Marjamäki
c39fbb86db
Tokenizer::simplifyKnownVariables : Fixed TODO test case when simplifying pointer alias in function call
2010-11-06 13:24:33 +01:00
Daniel Marjamäki
13c2a73d3f
Tokenizer::simplifyKnownVariables: Fixed TODO test case.
2010-11-06 11:38:58 +01:00
Daniel Marjamäki
dd41c74d7f
Fixed #2136 (false negative: array bounds)
2010-11-06 09:10:10 +01:00
Daniel Marjamäki
314e5b838b
Tokenizer: removed redundant assignments such as 'x+=0;'. Ticket: #2173
2010-11-06 07:23:35 +01:00
Robert Reif
431201dd67
Fixed #2174 (Tokenizer::simplifyFunctionReturn bug)
2010-11-06 06:53:09 +01:00
Daniel Marjamäki
52faadda89
Tokenizer: simplify calculations with zero better
2010-11-05 20:35:31 +01:00
Daniel Marjamäki
4fdb420454
Tokenizer: simplifyknownvariables, improved handling of string constant
2010-11-05 20:05:57 +01:00
Daniel Marjamäki
65c7b6eb8b
Uninitialized variables: better handling of for example 'a[1] = 1+a[2];'
2010-11-05 19:24:14 +01:00
Daniel Marjamäki
a90a7202cb
Uninitialized variables: detect usage of dead pointer: '*p += 10'
2010-11-05 17:04:41 +01:00
Daniel Marjamäki
95bfa50d7e
Null pointers: Fixed false negatives in the CheckAndDeRef checking
2010-11-04 21:22:29 +01:00
Daniel Marjamäki
f3bf14ba13
Fixed #2171 (false positive: possible nullpointer dereference)
2010-11-04 21:09:32 +01:00
Daniel Marjamäki
06ec4d9a84
GCC: Fixed compiler warnings about sign-conversion
2010-11-04 20:52:20 +01:00
Daniel Marjamäki
d21974777c
Fixed #2161 (false positive: assigned a value that is never used)
2010-11-04 20:16:17 +01:00
Daniel Marjamäki
0984a0be47
Tokenizer: Fixed 'a[b-1]+=1'
2010-11-04 19:38:19 +01:00
Daniel Marjamäki
fce6f11ed8
Tokenizer: simplify 'a[b-1]+=1' better
2010-11-04 19:02:54 +01:00
Daniel Marjamäki
c29940b114
Fixed #2166 (false positive: possible null pointer dereference)
2010-11-04 18:18:19 +01:00
Robert Reif
bc8ecf2aa7
Fixed #2168 (Segmentation fault of cppcheck)
2010-11-04 17:54:04 +01:00
Zachary Blair
10a4dde105
Fixed #2137 (Invalid mutual exclusion report)
2010-11-04 00:10:25 -07:00
Robert Reif
003f99da82
Symbol database: Fixed bug. Ticket: #2149
2010-11-04 06:58:37 +01:00
Robert Reif
cf0403434d
Symbol database: Bug fix
2010-11-03 20:33:07 +01:00
Daniel Marjamäki
1323cbdb6d
Fixed #2160 ( #2160 (Invalid unused variable report (style)))
2010-11-03 19:30:00 +01:00
Daniel Marjamäki
14803643ca
empty string test: Removed this check
2010-11-03 17:56:14 +01:00
Daniel Marjamäki
19f809c9b4
Unused variables: better handling of '= %var% ++'. Ticket: #2160
2010-11-02 20:01:12 +01:00
Daniel Marjamäki
dd4b2b8b46
Tokenizer: simplify 'x[0] += 1;'
2010-11-02 19:22:48 +01:00
Robert Reif
0fe72839d8
Symbol Database: Better handling of namespaces. Ticket: #2149
2010-11-02 18:30:57 +01:00
Daniel Marjamäki
c4452effa3
Tokenizer: simplify 'x.y += 1;'
2010-11-01 20:33:55 +01:00
Daniel Marjamäki
1b9de20f9b
Tokenizer: simplify 'case 0: x += y;'
2010-11-01 19:31:30 +01:00
Daniel Marjamäki
94fc13f0c4
Fixed #2159 (False positive: Null pointer dereference 'if (!x) return *y;')
2010-11-01 19:21:08 +01:00
Daniel Marjamäki
3fb17baa12
Fixed #2158 (False positive: value is not unused when using +=)
2010-11-01 17:36:54 +01:00
Daniel Marjamäki
285d76a413
Null pointers: Fixed false positive for 'x && x->y'
2010-10-31 19:48:58 +01:00
Daniel Marjamäki
69c6358198
CheckNullPointer: Reuse CheckNullPointer::isPointerDeRef in CheckNullPointer::nullPointerByDeRefAndChec
2010-10-31 16:07:50 +01:00
Daniel Marjamäki
32def3a3f0
CheckNullPointer: Reuse the CheckNullPointer::isPointerDeRef function
2010-10-31 15:46:08 +01:00
Daniel Marjamäki
33d3fd4716
CheckNullPointer: Reduced false negatives by making pattern more generic
2010-10-31 15:40:34 +01:00
Daniel Marjamäki
6faa4b79d3
CheckNullPointer: Refactoring. Created the function CheckNullPointer::isPointerDeRef that can be used to detect if a pointer is dereferenced
2010-10-31 15:32:19 +01:00
Daniel Marjamäki
1e866c3235
Visual Studio: Fixed compiler error
2010-10-31 11:42:45 +01:00
Daniel Marjamäki
bc283d8b99
Uninitialized variables: Broke out the checking into separate file
2010-10-31 12:31:11 +01:00
Daniel Marjamäki
df8a93bf97
Null pointers: Broke out the checking into separate file
2010-10-31 11:51:25 +01:00
Daniel Marjamäki
1ef09147f3
CheckOther: updated CheckOther::getErrorMessages
2010-10-31 10:07:35 +01:00
Daniel Marjamäki
6c19ea7b53
Tokenizer: Added a few comments
2010-10-31 09:58:44 +01:00
Daniel Marjamäki
558899dc74
Variable usage: Fixed false negative that I introduced when simplifying compound assignments
2010-10-31 09:34:25 +01:00
Daniel Marjamäki
23d3fd3a5a
Fixed #2147 (uninitialized variable: false negative for 'x += y;')
2010-10-31 08:47:13 +01:00
Daniel Marjamäki
8d96697623
GCC: Fixed compiler warnings
2010-10-30 14:53:25 +02:00
Daniel Marjamäki
b55f6458a2
Fixed #2120 (False positive: array index out of bounds (unknown type in struct, sub function))
2010-10-30 12:32:43 +02:00
Daniel Marjamäki
7b630cc581
Fixed #2154 (false positive: The loop might unintentionally skip an element in the container)
2010-10-30 11:22:30 +02:00
Kimmo Varis
9627b667a1
Move simplifyPath method from FileLister to Path class.
...
simplifyPath() "fits" better to Path class conceptually. It handles
paths, not lists them. Also this way we get rid of few unneeded
dependencies to FileLister class.
2010-10-29 22:21:27 +03:00
Daniel Marjamäki
9435fde551
Tokenizer: Added function for checking if code is Java/C#
2010-10-28 18:51:55 +02:00
Daniel Marjamäki
fee20bafa0
Java: Removed bailout added in 120073f000
2010-10-28 18:01:51 +02:00
Daniel Marjamäki
995e39200b
Fixed #2130 (Invalid possible NULL pointer dereference, etc.)
2010-10-27 20:20:10 +02:00
Daniel Marjamäki
fc98bcdcb2
Fixed #2141 (false positive: possible null pointer dereference)
2010-10-27 19:42:47 +02:00
Daniel Marjamäki
fd153eac02
Fixed #2142 (false positive: null pointer dereference (throw))
2010-10-27 19:38:42 +02:00
Robert Reif
b6aca47e11
Fixed #1195 (Uninitialized member variable not detected 'std::vector<int> *ints;')
2010-10-27 19:28:15 +02:00
Robert Reif
5a8f490f07
Fixed #2135 (False positive 'Can be const')
2010-10-27 19:25:34 +02:00
Pete Johns
8022baec2a
Removed unnecessary code duplication.
2010-10-27 19:34:06 +11:00
Cary R
59139b17cb
Fixed #2138 (Add support for comments in suppression file)
2010-10-26 21:22:11 +02:00
Daniel Marjamäki
a38b14d582
Tokenizer: Remove redundant semi colons
2010-10-26 21:05:20 +02:00
Daniel Marjamäki
79583ee45d
#2133 (cppcheck: floating point exception)
2010-10-26 20:05:34 +02:00
Daniel Marjamäki
6200d4505a
Fixed #2118 (Invalid syntax error report.)
2010-10-26 19:39:48 +02:00
Daniel Marjamäki
9370f552ac
Fixed #2134 (sizeof(*list) complains of null pointer dereference)
2010-10-26 18:26:02 +02:00
Daniel Marjamäki
b6106ddf72
Fixed #2132 (Internal error. Token::Match called with varid 0.)
2010-10-26 18:10:03 +02:00
Daniel Marjamäki
27235f27ae
Fixed #2129 (Invalid dereference after release report)
2010-10-26 17:49:48 +02:00
Daniel Marjamäki
893f7fa347
Fixed #2130 (Invalid possible NULL pointer dereference, etc.)
2010-10-26 17:40:30 +02:00
Daniel Marjamäki
bdd6d6d53d
null pointer: use simplified token list in the 'check and deref' checking
2010-10-25 21:05:43 +02:00
Daniel Marjamäki
132aa8d0c4
uninitialized variables: fixed fp when analysing loops
2010-10-25 20:56:15 +02:00
Daniel Marjamäki
026514db1a
Fixed #2127 (null pointer dereference after condition (SRD nr 522))
2010-10-25 19:43:54 +02:00
Daniel Marjamäki
41a06a21d9
using deallocated pointer: detect first problem reported in ticket #2090
2010-10-25 17:36:46 +02:00
Zachary Blair
26afb04dc5
Fixed #2105 (Incorrect operator: mutual exclusion over ||)
2010-10-24 18:14:21 -07:00
Daniel Marjamäki
24a2def3ad
Execution Path: Fixed FP in improved handling of loop bodies
2010-10-24 19:14:40 +02:00
Daniel Marjamäki
8f707e5e46
Null pointers: Better handling of loops
2010-10-24 18:51:14 +02:00
Daniel Marjamäki
40aeb17738
uninitialized variables: handling loop bodies. end upon '}'
2010-10-24 18:28:25 +02:00
Daniel Marjamäki
6601de7681
uninitialized variables: refactoring handling of loop bodies
2010-10-24 18:26:59 +02:00
Daniel Marjamäki
b66d3c8858
Fixed #2125 (uninitialized variable: better handling of for loops)
2010-10-24 18:12:48 +02:00
Daniel Marjamäki
cf86e11d05
Fixed #2111 (Class methods writing to a union are detected as 'can be const')
2010-10-24 16:43:10 +02:00
Daniel Marjamäki
13b8544436
Visual Studio: Fixed compiler warning. Ticket: #2123
2010-10-24 11:52:28 +02:00
Daniel Marjamäki
306587b1d0
Buffer overruns: Fixed TODO test case
2010-10-24 11:32:27 +02:00
Daniel Marjamäki
f3c6c64e9a
Fixed #2121 (False positive: Buffer access out-of-bounds when using uint32_t)
2010-10-23 13:12:17 +02:00
Daniel Marjamäki
120073f000
Java: fixed false positives about uninitialized variable
2010-10-23 10:56:30 +02:00
Daniel Marjamäki
5deb046ac5
Fixed #2120 (False positive: array index out of bounds (unknown type in struct, sub function))
2010-10-23 08:49:03 +02:00
Daniel Marjamäki
c907acf767
Fixed #1819 (False positive: auto variable assignment (unseen typedef))
2010-10-22 21:12:56 +02:00
Daniel Marjamäki
9fdc03fc1d
Fixed #2117 (false positive: buffer access out of bounds)
2010-10-22 20:15:51 +02:00
Daniel Marjamäki
9ae4a758b8
Fixed #2116 (Internal error. Token::Match called with varid 0)
2010-10-21 21:28:32 +02:00
Daniel Marjamäki
eba827bc4b
Fixed #2112 (Crash scanning qtcreator sources)
2010-10-21 19:42:09 +02:00
Daniel Marjamäki
6a66d32871
JAVA: better handling of java code
2010-10-20 22:15:35 +02:00
Daniel Marjamäki
4ff52b5883
Objective C: activate checking of .m and .mm files. The normal checking is used.
2010-10-20 21:09:07 +02:00
Daniel Marjamäki
8b866178ff
Fixed #2103 (false positive when variable is checked to NULL and not freed)
2010-10-20 20:38:37 +02:00
Daniel Marjamäki
68dd2f8378
Fixed #2113 (False positive: Memory leak where a pointer is passed in a struct to another function to be freed)
2010-10-20 18:39:40 +02:00
Daniel Marjamäki
02ba2b202e
Fixed #2110 (Tokenizer::simplifyTypedef: regression - wrong simplification of 'typedef char TString[256];')
2010-10-20 06:09:29 +02:00
Daniel Marjamäki
f8c02718a5
Activated checking of .java and .cs files
2010-10-19 21:54:15 +02:00
Daniel Marjamäki
20674e08d0
Stl: improved check for dangerous usage of c_str
2010-10-19 20:21:58 +02:00
Daniel Marjamäki
2ca7dbc004
Fixed #2109 (false positive: buffer overrun)
2010-10-19 18:23:44 +02:00
Daniel Marjamäki
0864a0700a
Fixed #2108 (False positive: the loop might unintentionally skip an element in the container.)
2010-10-18 20:05:54 +02:00
Daniel Marjamäki
e54129fa8d
STL: check for dangerous usage of string::c_str(). Ticket: #1116
2010-10-17 19:18:46 +02:00
Ettl Martin
7d1995dfaa
Merge branch 'master' of github.com:danmar/cppcheck
2010-10-17 21:56:05 +08:00
Daniel Marjamäki
92a1e9e76e
Severities: Added 'warning' and 'performance' severities. No changes to the command line options nor to the XML format. Ticket: #2106
2010-10-17 14:41:00 +02:00
Ettl Martin
f25f3c64b4
fixed style waring (You should use ++ and -- as prefix whenever possible as these are more efficient than postfix operators) in lib/checkclass.cpp
2010-10-17 20:15:29 +08:00
Kimmo Varis
ddfc7b2d5a
Run dmake to update Makefile and lib/lib.pri.
2010-10-17 00:57:25 +03:00
Kimmo Varis
7a84e7dcca
Add comment that qmake doesn't add _UNICODE define for project files.
2010-10-17 00:32:31 +03:00
Daniel Marjamäki
28e40cb9b0
unicode: updates to the handling of unicode filenames. Ticket: #2100
2010-10-16 21:39:58 +02:00
Daniel Marjamäki
88a98a2ef0
unicode: use short filenames when long filename doesn't work. Temporary solution for #2100
2010-10-16 12:40:21 +02:00
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
Daniel Marjamäki
6eeed00888
Fixed #2067 (Template methods do not 'use' private ones)
2010-09-30 21:22:49 +02:00
Daniel Marjamäki
415cbc63c3
Fixed #2066 (false positive: uninitialized variable when initializing through function pointer)
2010-09-27 19:26:09 +02:00
Daniel Marjamäki
80069f016e
Fixed #2065 (false positive: memory leak)
2010-09-27 17:53:10 +02:00
Pete Johns
6a52538a9a
Fixed #1949 : assert() hides memory leaks
...
Added separate unit-test (trac1949), initially broken to highlight the error and added "assert" to call_func_white_list.
Left TestMemleakInFunction::call_func() as is, as this wouldn't highlight the actual problem.
2010-09-27 20:25:34 +10:00
Daniel Marjamäki
cdecbe29d0
Optimisation: Made Tokenizer::simplifyInitVar faster
2010-09-26 15:54:41 +02:00
Daniel Marjamäki
ff7a99ad37
Revert "Optimisation: small speedups in the Tokenizer::simplifyTokenList handling"
...
This reverts commit 056037feed
.
2010-09-24 22:18:51 +02:00
Daniel Marjamäki
056037feed
Optimisation: small speedups in the Tokenizer::simplifyTokenList handling
2010-09-24 22:14:18 +02:00
Daniel Marjamäki
86e517c5d3
Fixed #1951 (Preprocessor: Compound macro statements not handled correctly)
2010-09-24 21:38:11 +02:00
Daniel Marjamäki
4c98a7e67b
Optimisation: Removed unused and slow code. The code was added to fix #1225 but it is now redundant.
2010-09-24 20:56:21 +02:00
Daniel Marjamäki
8950beac37
Optimisation to make the CheckUninitVar::parse slightly faster
2010-09-23 21:40:08 +02:00
Daniel Marjamäki
3f79faac2a
Fixed #2059 (cppcheck gives wrong path in error description)
2010-09-22 19:52:14 +02:00
Daniel Marjamäki
7e954ebb57
Optimisation: optimised Token::Match
2010-09-20 20:15:07 +02:00
Kimmo Varis
bc4c8e6e94
Delete unused VS lib-projects.
...
Those projects are just remainder from tries to create a real library
from the lib code.
2010-09-20 21:09:10 +03:00
Daniel Marjamäki
21bf58f1ec
Optimisation: small optimisation of CheckClass::privateFunctions
2010-09-20 19:43:03 +02:00
Kimmo Varis
d0acc16506
Update VS2010 solution/project files.
2010-09-20 18:09:17 +03:00
Daniel Marjamäki
78e13f098e
Refactorings: Optimised the Token::multiCompare function
2010-09-19 15:14:13 +02:00
Daniel Marjamäki
78bd66cd5c
Fixed #2056 (False positive: Resource leak)
2010-09-19 12:16:29 +02:00
Daniel Marjamäki
a6ff3681bb
Fixed #1802 (Preprocessor: macros are expanded wrong)
2010-09-18 22:20:01 +02:00
Daniel Marjamäki
a7cf68b9ef
Check Class: Removed the 'operator= should not return a const reference'
2010-09-18 20:05:34 +02:00
Daniel Marjamäki
6ba5385878
CheckClass: the 'virtual destructor' checking is currently inactive
2010-09-18 19:03:15 +02:00
Daniel Marjamäki
395f10aa6d
Fixed #2053 (false positive on list erase)
2010-09-18 16:46:38 +02:00
Daniel Marjamäki
de3c761790
Fixed #2052 (False positive: possible null pointer dereference 'else continue')
2010-09-18 14:56:07 +02:00
Daniel Marjamäki
fce70508f7
Fixed #2045 (False negative: Uninitialized variable (found with gcc))
2010-09-17 20:38:37 +02:00
Daniel Marjamäki
1c3862bd35
Execution Paths: fixed TODO test cases
2010-09-17 19:31:45 +02:00
Ettl Martin
f6e75b5542
fixed clang++ warning: lib/path.cpp:80:2: warning: no newline at end of file [-pedantic]
2010-09-16 21:39:17 +02:00
Daniel Marjamäki
f843678a07
Redundant conditions: some refactorings
...
* removed the 'redundant null pointer' check. sometimes it's unsafe to delete NULL pointer. and this check doesn't point out errors anyway.
* moved the 'redundant condition' check for set::remove. Moved it to CheckStl.
2010-09-16 18:49:23 +02:00
Ettl Martin
a56f6d276a
fixed warning from cppcheck: [lib/checkbufferoverrun.h:129]: (style) 'operator=' should not return a const reference
2010-09-15 22:25:12 +02:00
Daniel Marjamäki
ebf13acfbd
Fixed #2032 (inline suppressions fail with comment on the same line as function)
2010-09-15 21:10:54 +02:00
Daniel Marjamäki
de3b9f610a
Fixed #2033 (all inline suppressions fail with relative paths)
2010-09-15 21:03:21 +02:00
Daniel Marjamäki
7e67bb53b8
Fixed #2049 (False negative: 'Uninitialized variable' error won't show)
2010-09-15 20:04:50 +02:00
Daniel Marjamäki
416f093fc3
Tokenizer: fixed variable declaration simplification
2010-09-15 19:53:47 +02:00
Daniel Marjamäki
38b35feaa8
Tokenizer: the 'failed to parse typedef' messages should not be shown unless --debug-warnings are given
2010-09-14 20:59:09 +02:00
Daniel Marjamäki
42d0ad8262
Fixed #2048 (Preprocessor: ifndef incorrectly simplified)
2010-09-14 17:45:37 +02:00
Robert Reif
f2a3267ac7
Preprocessor: Report #error configuration when -D is used. Ticket: #2042
2010-09-14 07:21:19 +02:00
Robert Reif
0153dccb66
Symbol database: Skip bail out in constructors if a virtual function might be called because that would be undefined behaviour. Ticket: #1895
2010-09-14 07:16:53 +02:00
Daniel Marjamäki
b0bb71ee20
Preprocessor: Handle C++0x rawstrings by replacing them with normal strings. Ticket: #2022
2010-09-13 19:36:40 +02:00
Daniel Marjamäki
b1d74ed6b8
Revert "Preprocessor: Report #error configuration when -D is used. Ticket: #2042 "
...
This reverts commit 674644cb29
.
2010-09-13 16:59:43 +02:00
Robert Reif
674644cb29
Preprocessor: Report #error configuration when -D is used. Ticket: #2042
2010-09-13 16:55:40 +02:00
Robert Reif
6de1711515
Symbol database: reduce false negatives for 'uninitialized variable' when calling base class function. ticket: #1895
2010-09-12 22:40:51 +02:00
Daniel Marjamäki
84d9282da2
Memory leaks: remove redundant 'if return ; else|'
2010-09-12 21:41:13 +02:00
Robert Reif
aae2986361
Fixed #2042 (#error messages should be displayed when user defines are used)
2010-09-12 21:30:47 +02:00
Daniel Marjamäki
5a95303405
Memory leaks: reduce 'loop { if continue ;' to 'loop {'
2010-09-12 21:15:19 +02:00
Daniel Marjamäki
0a30aba2e6
Memory leaks: insert ';' in the simplifycode to split up the commands
2010-09-12 21:04:05 +02:00
Daniel Marjamäki
9c4a05a3bd
Memory leaks: simplify 'loop { use ; callfunc ; }' to 'use ;'
2010-09-12 20:45:30 +02:00
Daniel Marjamäki
ceeef847ef
Memory leaks: simplify 'if break ; break ;'
2010-09-11 21:48:40 +02:00
Daniel Marjamäki
7aa0504692
Memory leaks: simplify 'use use'
2010-09-11 21:32:21 +02:00
Daniel Marjamäki
424fe064cb
Memory leaks: don't write debug warning for '; alloc ; dealloc ; return ; }'
2010-09-11 21:14:20 +02:00
Daniel Marjamäki
d4e045cee5
Memory leaks: fixed try/catch and nested loops simplifications
2010-09-11 21:07:35 +02:00
Daniel Marjamäki
4064712baa
Memory leaks: improved simplification for 'callfunc'
2010-09-11 20:49:24 +02:00
Daniel Marjamäki
73122c3e8a
Memory leaks: Improved the simplifycode for 'use ; if| use ;'
2010-09-11 20:18:16 +02:00
Daniel Marjamäki
ecd863700e
Fixed #2023 (false positive with realloc())
2010-09-11 11:15:04 +02:00
Robert Reif
69afc0a0db
Symbol database: fixed false positive. ticket: #1895
2010-09-11 08:23:30 +02:00
Daniel Marjamäki
0418731473
Fixed #2030 (False positive: Uninitialized variable when function does not return)
2010-09-10 19:02:40 +02:00
Robert Reif
5a6eff90d1
Symbol database: Refactoring. ticket: #1895
2010-09-10 07:02:49 +02:00
Daniel Marjamäki
0afd19c59b
Fixed #2039 (unions not handled properly, false positive about initialization)
2010-09-09 20:15:00 +02:00
Daniel Marjamäki
929a54e1b0
Fixed #2038 (memleak false positive with assignment expression in arguments)
2010-09-09 19:40:36 +02:00
Daniel Marjamäki
5af0d65aef
Fixed #2025 (iso646 c++ operators are not handled correctly)
2010-09-09 17:43:09 +02:00
Robert Reif
6d35396720
Symbol database: refactoring - differentiate between member data initialization and assignment and save the order of variable declarations. makes it possible to create some additional checks. ticket: #1895
2010-09-09 07:26:40 +02:00
Robert Reif
c3762903a9
Symbol database: fixed false negative for uninitialized variable. ticket: #1895
2010-09-09 07:21:51 +02:00
Daniel Marjamäki
80be31de13
Fixed #2037 (memleak not detected in exit path when variable used)
2010-09-08 20:03:22 +02:00
Daniel Marjamäki
8e746ca53f
CheckMemoryleaks: reduce 'use ; if return ; dealloc ;' to 'if return ; dealloc ;'. ticket: #2037
2010-09-08 19:22:03 +02:00
Robert Reif
2fc2859b68
Fixed #2035 (Enum 'qboolean' hides typedef with same name)
2010-09-08 06:45:57 +02:00
Daniel Marjamäki
5688412f00
Fixed #2030 (False positive: Uninitialized variable when function does not return)
2010-09-07 20:25:29 +02:00
Daniel Marjamäki
3a4cda0f0d
Fixed #2034 (false positive: unused private function (Borland C++ __property))
2010-09-07 18:37:43 +02:00
Reijo Tomperi
d0423ff8ac
Set encoding to UTF-8 for some files.
2010-09-06 22:39:02 +03:00
Daniel Marjamäki
cfe694330f
Fixed #2024 (Internal Error on multiple append calls on same string object)
2010-09-06 21:34:51 +02:00
Kimmo Varis
e800490b50
Add back <stdexcept> as GCC requires it.
...
I removed <stdexcept> after checking it builds with VS 2008. But Dan
pointed out GCC needs that header.
2010-09-06 22:00:56 +03:00
Kimmo Varis
3551ce8b58
Remove unneeded includes.
2010-09-06 21:08:50 +03:00
Robert Reif
28c5893ee0
const functions: fixed false negatives for the type P. ticket: #1884
2010-09-06 19:04:14 +02:00
Daniel Marjamäki
cfbc06c8b6
removed 'empty catch block' check. to avoid false positives we'll need to check if it is bad with an empty catch block (dead pointer/undefined behaviour/etc)
2010-09-05 13:27:58 +02:00
Kimmo Varis
120b6b9133
Remove unused function.
...
I forgot to remove the function that was used in command line
parsing code.
2010-09-05 11:24:01 +03:00
Kimmo Varis
45eaebe423
Move CLI command line parsing to own class.
2010-09-05 11:17:31 +03:00
Daniel Marjamäki
0f8bc429ad
Fixed #2021 (false positive: syntax error with -std=gnu++0x code)
2010-09-05 08:16:19 +02:00
Daniel Marjamäki
7d3ccb064b
Fixed #2020 (false positive: (error) Uninitialized variable, used in asm statement)
2010-09-05 08:06:37 +02:00
Daniel Marjamäki
51bc784537
Tokenizer: Fixed problem in Tokenizer::simplifyRedundantParanthesis when simplifying 'void delete(double num);'
2010-09-05 07:53:43 +02:00
Daniel Marjamäki
a2b4e5641f
Fixed #2010 (missing continue in switch check ?)
2010-09-04 14:24:45 +02:00
Daniel Marjamäki
75fb99cee7
Fixed #2015 (### Internal error in Cppcheck. Please report it.)
2010-09-04 11:49:56 +02:00
Daniel Marjamäki
9415423352
Fixed #2017 (false positive::struct or union member 'Base::m_ui' is never used)
2010-09-04 11:21:34 +02:00
Daniel Marjamäki
beb4dddb2e
Refactoring CheckMemoryLeaks
2010-09-04 10:06:34 +02:00
Daniel Marjamäki
f490ebcf88
Fixed #1872 (Confused -v switch)
2010-09-03 13:30:49 +02:00
Daniel Marjamäki
1938b8a423
Fixed #1976 (False Positives with unions)
2010-09-03 08:10:29 +02:00
Daniel Marjamäki
fb4fce466e
Fixed #2014 (False positive with longjmp)
2010-09-03 07:18:01 +02:00
Daniel Marjamäki
427c0f4bfd
Fixed #1975 (segmentation fault of cppcheck)
2010-09-02 23:01:12 +02:00
Daniel Marjamäki
190a0040b7
Null pointer: Fixed false positive
2010-09-02 21:08:58 +02:00
Daniel Marjamäki
01b05618e5
Tokenizer: Fixed Cppcheck warnings
2010-09-02 20:51:01 +02:00
Robert Reif
80fdf1ca51
Symbol database: Fixed false negatives for unused private functions. Ticket: #1895
2010-09-02 19:22:54 +02:00
Sbastien Debrard
2049f70754
Fixed #1972 (file extensions)
2010-09-02 19:17:47 +02:00
Robert Reif
fbffaade2e
Fixed #2011 (Parser error in template function)
2010-09-02 19:09:06 +02:00
Robert Reif
cb318c21e3
Symbol database: adds support for inline functions returning function pointers and starts to convert privateFunctions over to the symbol database. Ticket: #1895
2010-09-02 07:40:20 +02:00
Daniel Marjamäki
eb74bfc15a
Fixed #2007 (False positive: member variable not initialized (Borland C++ property))
2010-09-01 18:10:12 +02:00
Robert Reif
4153b7d24b
refactoring namespace handling. ticket: #2001
2010-09-01 16:47:53 +02:00
Robert Reif
7a8190e188
Fixed #2002 (Wrong operator() parsing)
2010-09-01 06:32:46 +02:00
Kimmo Varis
63f1de509c
Merge branch 'master' of github.com:danmar/cppcheck
2010-08-31 23:26:25 +03:00
Daniel Marjamäki
55e0e435bd
Fixed #1959 (Do you support the oracle Pro*C ?)
2010-08-31 23:25:41 +03:00
Daniel Marjamäki
3a8e7b4bf0
Exception safety: Removed the noisy checks and keep the useful checks
2010-08-31 22:22:59 +02:00
Kimmo Varis
42dfd255e3
Fix Linux makefile after moving timer code to own files.
2010-08-31 23:22:48 +03:00
Kimmo Varis
d417256c98
Move timer code to own cpp/h files.
2010-08-31 23:18:07 +03:00
Daniel Marjamäki
b2a775f3e0
Fixed #1959 (Do you support the oracle Pro*C ?)
2010-08-31 21:40:51 +02:00
Kimmo Varis
9a52b35144
Merge branch 'master' of github.com:danmar/cppcheck
2010-08-31 22:05:08 +03:00
Daniel Marjamäki
688b2aefe9
Tokenizer: Fixed warnings about unsigned / signed conversion
2010-08-31 21:04:17 +02:00
Kimmo Varis
ee7bc64197
Fix building CLI with VS2010.
2010-08-31 22:04:13 +03:00
Daniel Marjamäki
8ff1e71b22
Fixed #2004 (False positive in 'variable assigned a value but is never used' check)
2010-08-31 20:58:37 +02:00
Kimmo Varis
e825fb1e70
Fix CLI build with VS2008.
2010-08-31 21:58:03 +03:00
Daniel Marjamäki
1d78b5072d
Fixed #1996 (False positive for 'Variable foo is assigned a value that is never used')
2010-08-31 20:33:28 +02:00
Daniel Marjamäki
513826d8c2
Tokenizer::setVarId : don't give operator function variable id 'operator new []('. Ticket: #1997
2010-08-31 20:15:24 +02:00
Daniel Marjamäki
fbe11b9bb9
Fixed #1999 (False positive: uninitialized variable (__published variables))
2010-08-31 19:48:04 +02:00
Debrard Sébastien
071f7d5f34
Fixed #2005 (refactoring dangerous / obsolete functions checks)
2010-08-31 18:58:01 +02:00
Robert Reif
4463f650d0
Fixed #2003 (false positive in set functions)
2010-08-31 17:59:17 +02:00
Robert Reif
5aab602709
Fixed #2001 (No 'The function ... can be const' warnings when base class is in namespace.)
2010-08-31 17:57:42 +02:00
Robert Reif
c56911ba6a
Fixed #2000 (segmentation fault of cppcheck with bitfield)
2010-08-31 17:51:10 +02:00
Robert Reif
16efc9be26
Fixed #1887 (internal error in GLee)
2010-08-31 17:48:19 +02:00
Daniel Marjamäki
dcc02166c6
Fixed #1998 (VS compiler warning with current HEAD)
2010-08-30 21:45:26 +02:00
Daniel Marjamäki
7ec3c72a19
Fixed #1997 (operator new [] simplified wrong)
2010-08-30 21:06:22 +02:00
Daniel Marjamäki
9c499db17b
Revert "Visual Studio: Added /MP switch"
...
This reverts commit 2450a80556
.
2010-08-30 17:51:08 +02:00
Daniel Marjamäki
527354b4be
Fixed #1886 (Associate header file with code file including it)
2010-08-30 17:44:46 +02:00
Robert Reif
96d73c189c
Symbol database: better handling of operator functions. Ticket: #1895
2010-08-30 17:14:20 +02:00
Robert Reif
0d530711f6
Fixed #1988 (segmentation fault of cppcheck with wrong syntax of -std=c++0x)
2010-08-30 07:25:17 +02:00
Robert Reif
a862e982ff
Fixed #1993 (False negatives: uninitialised variables in constructor)
2010-08-29 16:36:10 +02:00
Daniel Marjamäki
edec43c913
mention the manual in the --help output
2010-08-29 13:21:35 +02:00
Daniel Marjamäki
02939c78f8
Fixed #1994 (False 'Found obsolete function' positive)
2010-08-29 12:01:32 +02:00
Daniel Marjamäki
71453871d4
Fixed #1989 (false positive: Variable 'Aux13' is assigned a value that is never used)
2010-08-28 13:32:43 +02:00
Robert Reif
b1bf201a8a
Symbol database: Refactorings. Ticket: #1895
2010-08-28 11:23:23 +02:00
Daniel Marjamäki
83a8879f11
Tokenizer::simplifyInitVar : Refactorings and fixes related to ticket #1989
2010-08-27 22:58:21 +02:00
Daniel Marjamäki
d45186d645
Added --debug-warnings that we can use to enable various debug warnings
2010-08-27 20:28:00 +02:00
Daniel Marjamäki
8eee4cf2e8
Fixed #1984 (false positive: syntax error in for loop (< -operator))
2010-08-26 23:24:01 +02:00
Daniel Marjamäki
57523574ef
Fixed #1985 (false positive: syntax error in try catch-block with for()-loop inside)
2010-08-26 23:19:18 +02:00
Daniel Marjamäki
02088443f9
quick fix for #1969 (False positive: Uninitialized variable when exit() is called before variable is used.)
2010-08-26 23:11:04 +02:00
Daniel Marjamäki
0597c50a47
Fixed #1966 (False positive: Unused private function (virtual function in base class))
2010-08-26 22:05:45 +02:00
Daniel Marjamäki
df87ce9e04
Fixed #1945 (False positives when a for loop header is in a macro)
2010-08-26 21:57:48 +02:00
Daniel Marjamäki
1d9e484053
Fixed #1951 (Preprocessor: Compound macro statements not handled correctly)
2010-08-26 21:33:45 +02:00
Robert Reif
499a12c896
Tokenizer::simplifyTypedef: Report about unhandled typedefs. Ticket: #1821
2010-08-26 20:44:13 +02:00
Daniel Marjamäki
8b18aaff25
Fixed #1981 (false positive: syntax error on template operator <)
2010-08-26 07:43:00 +02:00
Robert Reif
5c3ecc31da
Code cleanup
2010-08-26 07:32:48 +02:00
Daniel Marjamäki
ca9cdf5bf5
Tokenizer: If syntax errors are found then don't return a token list. Ticket: #1961
2010-08-25 22:10:21 +02:00
Daniel Marjamäki
6c8287913c
Tokenizer: Detect some syntax errors when trying to use templates. Ticket: #1961
2010-08-25 21:57:57 +02:00
Robert Reif
4a6070d2af
fix 2 problems related to ticket 1976:
...
1. nested unnamed anonymous structures and unions were not supported.
2. declaration split up in class had bug if proceeded by access specifier.
2010-08-25 20:17:31 +02:00
Robert Reif
ff4ebbede3
Fixed gcc compiler warning about uninitialized variable tok1. Ticket: #1965
2010-08-25 07:38:53 +02:00
Daniel Marjamäki
e7f7c77eab
Fixed #1948 (C++ class scoping not followed)
2010-08-24 22:04:14 +02:00
Daniel Marjamäki
ca407110dc
Fixed #1936 (Internal error. Token::Match called with varid 0.)
2010-08-24 20:58:22 +02:00
Daniel Marjamäki
225114df1c
Fixed #1960 (cppcheck hangs with 100% cpu load)
2010-08-24 20:50:04 +02:00
Robert Reif
d961a6ec9e
Tokenizer: Fixed cppcheck and compiler warnings
2010-08-24 07:28:56 +02:00
Daniel Marjamäki
39a69b0871
Fixed #1970 (Internal error. CheckClass::SpaceInfo::getVarList found variable '_root' with varid 0.)
2010-08-23 21:22:11 +02:00
Daniel Marjamäki
f7063bed7c
Fixed #1967 (Tokenizer::setVarid doesn't set variable value (list of function pointers))
2010-08-23 20:15:02 +02:00
Daniel Marjamäki
3b716dfcc9
Tokenizer: Simplified the bitfields handling. This patch just looks for the bitfield signature but doesn't care about the type. I don't think any other code would have this same signature so it should be OK. We could add code to only look in structures and classes but I don't think that is necessary. Ticket: #1956
2010-08-23 07:29:05 +02:00
Robert Reif
807269b5e9
Refactoring handling of microsoft types. Ticket: #1956
2010-08-22 21:53:45 +02:00
Robert Reif
cb7b508f77
Tokenizer::simplifyBitfields: fixed more issues. Ticket #1956
2010-08-22 13:25:47 +02:00
Robert Reif
3fcca23b53
Tokenizer: better handling of bitfields. Ticket: #1956
2010-08-22 09:41:22 +02:00
Robert Reif
77d634127c
Tokenizer: simplify DECLARE_DYNAMIC and DECLARE_DYNCREATE
2010-08-22 09:38:05 +02:00
Robert Reif
ac9078857e
Tokenizer: simplify bitfields. Ticket: #1956
2010-08-21 16:34:41 +02:00
Robert Reif
9c594684db
Tokenizer: handle DECLARE_DYNAMIC. Ticket: #1956
2010-08-21 07:55:14 +02:00
Robert Reif
7173e01926
Fixed #1965 (tokenizer::simplifyEnum add support for C++0x enums)
2010-08-21 07:44:56 +02:00
Robert Reif
7b2b844b8e
Fixed #1964 (False positive: function can be const (get this))
2010-08-20 19:47:41 +02:00
Daniel Marjamäki
741ce40e3d
Tokenizer::setVarId : fixed problem for class members
2010-08-20 19:28:10 +02:00
Daniel Marjamäki
3dd504bcb2
updates of Visual Studio files
2010-08-20 17:59:09 +02:00
Robert Reif
66de0d8f72
Fixed #1954 (False positive: function can be const (derived class))
2010-08-20 07:28:31 +02:00
Robert Reif
f123e951ec
Fixed #1963 (typedef array incorrectly simplified)
2010-08-20 07:11:02 +02:00
Daniel Marjamäki
cfa7b4906e
Symbol database: bug fixes. Ticket: #1895
2010-08-18 22:42:04 +02:00
Daniel Marjamäki
0934035fcf
Fixed #1955 (cppcheck hangs with 100% cpu load)
2010-08-18 22:22:14 +02:00
Daniel Marjamäki
1fd773b245
Fixed #1944 (segfault in Tokenizer::simplifyLogicalOperator)
2010-08-17 20:06:20 +02:00
Daniel Marjamäki
aa00587fed
#1943 (segmentation fault of cppcheck (= default))
2010-08-17 19:50:21 +02:00
Daniel Marjamäki
1faaa5471c
Fixed #1946 ('Dereferenced iterator erased' false positive)
2010-08-17 18:56:11 +02:00
Robert Reif
86f1718b1c
Symbol database: Fixed the error reporting so errors are shown in the gui. Ticket: #1895
2010-08-17 17:20:54 +02:00
Daniel Marjamäki
64cdee62ef
Fixed #1942 (false positive: uninitialized variable in __asm__ statement)
2010-08-16 19:38:47 +02:00
Robert Reif
cc079462dd
Symbol database: fixed problems with namespaces. Ticket: #1895
2010-08-16 18:55:39 +02:00
Daniel Marjamäki
85acb005a2
Fixed #1941 (Internal error::Space Info::getVarList found variable with varid 0)
2010-08-16 18:51:25 +02:00
Sbastien Debrard
296289d190
Refactoring of obsolete functions checks. Ticket: #1940
2010-08-15 21:26:13 +02:00
Daniel Marjamäki
72916caee6
Reverted 7398453cb0
2010-08-15 21:25:14 +02:00
Sbastien Debrard
7398453cb0
Refactoring of obsolete functions checks. Ticket: #1940
2010-08-15 21:22:33 +02:00
Daniel Marjamäki
fe482785aa
Variable Id: Fixed various bugs related to templates and bitfields. Ticket: #1928
2010-08-15 11:54:28 +02:00
Daniel Marjamäki
4949869f5f
removed unused variable 'dot'
2010-08-15 09:03:16 +02:00
Daniel Marjamäki
e1d6320a55
quick fix for #1905 (false positive: the function '...' can be declared as const (member array is assigned))
2010-08-15 08:30:21 +02:00
Robert Reif
556ef9afcf
Symbol database: report error when it is detected that a variable id is missing. Ticket: #1928
2010-08-15 08:03:27 +02:00
Erik Lax
54b7f972c9
Fixed #1932 (false positive: unused private function)
2010-08-15 07:44:08 +02:00
Zachary Blair
c8087d3389
Fixed #162 (Initialisation of a variable by itself)
2010-08-14 21:34:04 -07:00
Daniel Marjamäki
4ff9a1ac94
Fixed #1928 (missing varId for template class variable)
2010-08-14 20:50:49 +02:00
Erik Lax
248bb3b6e8
Fixed #1935 (false negative: detect buffer overrun from network functions (recv, recvfrom..))
2010-08-14 20:19:23 +02:00
Sbastien Debrard
a55a06cea5
Fixed #1933 (Add checks for obsolete functions)
2010-08-14 20:13:46 +02:00
Daniel Marjamäki
00dc3adc18
ErrorLogger: Added better \n handling to the XML output
2010-08-14 18:36:36 +02:00
Daniel Marjamäki
2e249670b3
dangerous scanf usage: Added verbose information
2010-08-14 18:35:48 +02:00
Daniel Marjamäki
5846630fa9
Added scanf check. Modified patch submitted by Eric Sesterhenn
2010-08-14 15:15:12 +02:00
Robert Reif
7c18ece65d
Symbol database: Fixed bug when end of namespace wasn't found. Ticket: #1895
2010-08-14 08:16:53 +02:00
Daniel Marjamäki
6efad92647
dangerous functions: removed 'scanf' because it can be used in a safe way
2010-08-14 07:50:35 +02:00
Robert Reif
db78c3acdf
Symbol database: fixed linenr problem in virtual destructors check
2010-08-13 23:57:53 +02:00
Daniel Marjamäki
e9a3d03372
Dangerous functions: Improved error messages
2010-08-13 22:27:45 +02:00
Erik Lax
032d2678aa
Fixed #1930 (false negative: bad iterators checks fails to detect bugs with preincrement)
2010-08-13 20:54:31 +02:00
Robert Reif
ab7bb876f9
Symbol database: Refactoring virtual destructors check. Ticket: #1895
2010-08-13 18:34:02 +02:00
Robert Reif
a994f235c5
Symbol database: move finding base classes until after all classes are found because of template instantiation. Ticket: #1895
2010-08-13 07:35:30 +02:00
Robert Reif
b92644a30c
Symbol database: refactoring variable handling. Ticket: #1895
2010-08-13 07:34:34 +02:00
Daniel Marjamäki
6cb7fefdbf
Added command line option --report-progress. ticket: #1926
2010-08-12 21:03:33 +02:00
Ettl Martin
a6be941006
actived Wconversion flag in Makefile and fixed almost all Warnings from gcc-4.4
2010-08-12 19:39:19 +02:00
Robert Reif
47c776247a
Symbol database: fix a small bug and add more tests. ticket: #1895
2010-08-12 07:38:27 +02:00
Robert Reif
c88aa242e8
Symbol database: better handling of 'friend'. ticket: #1895
2010-08-11 22:36:04 +02:00
Daniel Marjamäki
cb72f21994
Optimisation in Tokenizer::tokenize
2010-08-11 17:29:33 +02:00
Daniel Marjamäki
0ea9e98680
Optimisation: Made inner loop in Tokenizer::setVarId faster
2010-08-10 19:06:45 +02:00
Daniel Marjamäki
a1f288d088
Tokenizer::setVarId : Fixed a problem when using static class members
2010-08-10 18:22:58 +02:00
Robert Reif
03c436a735
Symbol database: Refactoring
2010-08-10 18:01:33 +02:00
Robert Reif
483a3ddfe1
Fixed #1925 (fix some cppcheck warnings in cppcheck)
2010-08-10 07:26:59 +02:00
Robert Reif
217b9425b5
Fixed #1922 (False positive: function can be const when both const and non-const functions are provided.)
2010-08-09 17:54:16 +02:00
Robert Reif
12523bc745
Symbol database: Enhancements and fixes. Ticket: #1895
2010-08-09 17:50:26 +02:00
Daniel Marjamäki
6a3befa720
Optimising: Tokenizer::setVarId when setting variable ids for struct/class members
2010-08-08 19:14:23 +02:00
Daniel Marjamäki
195b48e81f
astyle formatting
2010-08-08 18:55:15 +02:00
Daniel Marjamäki
1d79c164c4
Optimisation: Optimised firstWordEquals
2010-08-08 18:54:49 +02:00
Daniel Marjamäki
5a8181d425
Tokenizer: 'simplifyCalculations();' should have the same results as 'while (simplifyCalculations());'
2010-08-08 09:25:09 +02:00
Daniel Marjamäki
11ef2c0a06
Refactoring: Cppcheck::reportProgress needs to call _errorLogger::reportProgress. Ticket: #1625
2010-08-08 08:46:47 +02:00
Daniel Marjamäki
1555901077
Refactoring: Made Tokenizer::simplifyCalculations a little faster
2010-08-08 08:28:28 +02:00
Daniel Marjamäki
764ce99c6f
Performance: Refactoring CheckOther::nullPointerStructByDeRefAndChec to make it faster
2010-08-07 21:00:17 +02:00
Daniel Marjamäki
dcf54621d4
visual studio: fixed a few compiler warnings (when saving istream::get result in a char)
2010-08-07 20:33:24 +02:00
Daniel Marjamäki
029613d4c4
Fixed #1923 (False positive: Possible null pointer derefence in else if)
2010-08-07 19:59:56 +02:00
Daniel Marjamäki
262885f3e0
Fixed #1921 (false positive: the function '...' can be declared as const (inline friend))
2010-08-07 16:08:44 +02:00
Daniel Marjamäki
ed4f1164a1
Fixed #1894 (unreadVariable false positive with const references)
2010-08-07 15:53:51 +02:00
Daniel Marjamäki
050011d287
Fixed #1881 (false positive: The function '...' can be const (nonconst code is hidden inside #if))
2010-08-07 13:08:36 +02:00
Daniel Marjamäki
54121a74ff
Symbol Database: Don't use it when it is not needed
2010-08-07 12:41:11 +02:00
Daniel Marjamäki
9e7b087832
Refactoring: Made CheckClass members private
2010-08-07 12:26:42 +02:00
Daniel Marjamäki
c395e51389
New check: look for calculation inside sizeof
2010-08-06 22:57:10 +02:00
Daniel Marjamäki
7911626aed
gcc: fixed some more -Wsign-conversion warnings
2010-08-06 22:43:06 +02:00
Daniel Marjamäki
12217461a2
gcc: fixed some more -Wsign-conversion warnings
2010-08-06 22:37:48 +02:00
Daniel Marjamäki
adc47f1820
Fixed #1487 (fix gcc compiler warnings)
2010-08-06 21:02:43 +02:00
Daniel Marjamäki
271a74a16c
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 19:42:31 +02:00
Daniel Marjamäki
faa713e7b5
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 19:40:54 +02:00
Daniel Marjamäki
290d02780f
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 19:38:21 +02:00
Daniel Marjamäki
3adfc61eca
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 19:15:44 +02:00
Daniel Marjamäki
146465a6ad
gcc: Fixed some compiler warnings when using -Wsign-conversion. Ticket: #1487
2010-08-06 18:42:55 +02:00
Daniel Marjamäki
7fb44d1995
gcc: fixed some compiler warnings when using -Wsign-conversion
2010-08-06 18:32:31 +02:00
Daniel Marjamäki
6346e1aa90
Borland C++: Fixed compiler errors
2010-08-06 17:44:26 +02:00
Daniel Marjamäki
f5823f7747
Visual Studio: Fixed warnings
2010-08-06 17:32:16 +02:00
Daniel Marjamäki
567f1da4b4
Preprocessor: Compiler dependent parsing of '<backspace><space><newline>'. Maybe it should be possible to control it from the commandline instead. Ticket: #640
2010-08-06 08:50:31 +02:00
Daniel Marjamäki
32d98969fb
suppress visual studio warnings about loosing data when calculating Token::progressValue
2010-08-05 21:40:04 +02:00
Daniel Marjamäki
eedb5e383e
Memory leaks: better handling of 'return strcmp(..' etc
2010-08-05 21:23:32 +02:00
Daniel Marjamäki
81c058f2be
Merge branch 'master' of github.com:danmar/cppcheck
2010-08-05 19:02:21 +02:00
Daniel Marjamäki
2450a80556
Visual Studio: Added /MP switch
2010-08-05 19:02:05 +02:00
Ettl Martin
d16944398a
fixed compiler Warning in lib/checkbufferoverrun about comparison of signed and unsigned variable
2010-08-05 18:58:58 +02:00
Daniel Marjamäki
1b2f16f443
Buffer overflow: Fixed two TODO test cases
2010-08-05 11:01:47 +02:00
Daniel Marjamäki
65f7bcbfa5
null pointers: fixed TODO assertion - dereference pointer in function call and then checking that it is not NULL
2010-08-05 08:19:36 +02:00
Daniel Marjamäki
6f228033d2
null pointers: fixed todo test case
2010-08-05 08:06:19 +02:00
Daniel Marjamäki
9d24c9ceaa
Memory leaks: refactoring return handling
2010-08-04 23:01:32 +02:00
Daniel Marjamäki
239d264432
uninitialized variables: fixed false negatives when uninitialized pointer data is read
2010-08-04 21:13:40 +02:00
Daniel Marjamäki
6d94c4f15e
Memory leaks: don't translate 'return p[10];' to 'return use ;'
2010-08-04 20:48:20 +02:00
Daniel Marjamäki
33bf8bf730
Fixed #1670 (False negative: Array index out of bounds in return statement)
2010-08-04 20:38:52 +02:00
Daniel Marjamäki
c9b1804954
astyle formatting
2010-08-04 20:28:41 +02:00
Daniel Marjamäki
08e2d91372
Fixed #1919 (option '--suppressions file' can not work when filename includes colon)
2010-08-03 17:52:03 +02:00
Daniel Marjamäki
9edecd4a3f
Added ErrorLogger::reportProgress and removed ErrorLogger::ReportProgress. This will make it easier for GUI and other clients to display progress information.
2010-08-03 16:36:21 +02:00
Daniel Marjamäki
6700351ede
Fixed #1833 (memory leak detected in version 1.37 not detected in 1.43)
2010-08-02 23:04:23 +02:00
Daniel Marjamäki
ff9d3d0965
memory leaks: better handling of 'loop { dealloc ; alloc ; }'
2010-08-02 22:17:09 +02:00
Daniel Marjamäki
ae0252dc91
memory leaks: simplify 'callfunc ; ;'
2010-08-02 21:59:47 +02:00
Daniel Marjamäki
df44703ee9
memory leaks: better checking of function calls. If there are statements after the function call it is unlikely the function call is noreturn
2010-08-02 21:56:50 +02:00
Kimmo Varis
2fa4378338
Astyle cleanup with new Astyle options.
2010-07-31 15:44:08 +03:00
Daniel Marjamäki
a274cb1015
cleanup headers
2010-07-31 08:52:28 +02:00
Daniel Marjamäki
694325d51f
Fixed #1912 (False positive: memory leak (calling noreturn function))
2010-07-30 08:50:10 +02:00
Daniel Marjamäki
2e2baa23a6
Fixed #1909 (### Internal error in Cppcheck. Please report it)
2010-07-28 21:03:15 +02:00
Ettl Martin
9fa6b20b9d
checkheaders: removed redundant include (token.h) from errorlogger.cpp
2010-07-27 21:40:38 +02:00
Daniel Marjamäki
81d7a37b68
Fixed #1864 (Relative Path of #include-File doesn't work)
2010-07-27 18:07:30 +02:00
Daniel Marjamäki
2fd2ab1712
Fixed a vs compiler warning. Ticket: #1901
2010-07-27 17:48:22 +02:00
Kimmo Varis
45a6742e3f
Windows: Add _CRT_SECURE_NO_WARNINGS define.
...
The _CRT_SECURE_NO_WARNINGS define suppresses some Windows-specific
compile warnings. Windows has "secure" versions of some functions
and compiler outputs warnings that those "secure" versions should
be used instead. Since other platforms don't have those functions
we just suppress this warning for now on.
2010-07-27 17:34:13 +03:00
Daniel Marjamäki
94acebc3d0
Cleanup redundant include
2010-07-27 09:32:20 +02:00
Zachary Blair
9f44d9eb62
Fixed #1889 (false positive: Common realloc mistake)
2010-07-26 23:17:27 -07:00
Daniel Marjamäki
7c5219324e
Refactoring: Cleanup include that checkheaders reported as not needed
2010-07-26 22:05:51 +02:00
Kimmo Varis
17395b310d
Remove unneeded path separator conversion.
2010-07-26 22:49:47 +03:00
Kimmo Varis
2f8d43984f
Fix path separators for couple of messages.
2010-07-26 22:43:49 +03:00
Kimmo Varis
7b8cb17a44
Windows: convert to internal separators when finding files.
2010-07-26 22:16:19 +03:00
Kimmo Varis
60cf37d1ef
Update VS 2010 project files.
2010-07-26 22:06:33 +03:00
Robert Reif
0bb07e6947
Create a symbol database
2010-07-26 16:46:37 +02:00
Daniel Marjamäki
bb7484945a
Fixed #1887 (internal error in GLee)
2010-07-25 18:20:30 +02:00
Daniel Marjamäki
e358af9018
Refactoring: Report progress when checking takes a long time. Ticket: #1868
2010-07-25 18:19:37 +02:00
Daniel Marjamäki
786ca037ec
Refactoring: changed 'bool varid=0' to 'bool varid=false'
2010-07-25 18:17:44 +02:00
Daniel Marjamäki
29b2be19ab
Fixed #1383 (Preprocessor: define - ifndef problem)
2010-07-25 15:19:25 +02:00
Daniel Marjamäki
0c65796984
Refactoring: Cleanup headers using checkheaders
2010-07-24 22:12:56 +02:00
Daniel Marjamäki
19e26c3b80
CheckBufferOverrun: report progress. Ticket: #1868
2010-07-24 20:54:42 +02:00
Daniel Marjamäki
b8146271a2
Report progress when checking a file takes a long time. Ticket: #1868
2010-07-24 18:58:52 +02:00
Daniel Marjamäki
05c4138b2f
Refactoring: Removed unused variable _xmllist
2010-07-24 18:57:38 +02:00
Daniel Marjamäki
9c17114668
Fixed #1893 (false positive: dereferencing null pointer (try/catch))
2010-07-24 14:27:18 +02:00
Daniel Marjamäki
dfbdd8f9c4
Refactoring Token::Match: Report errors through ErrorLogger. Ticket: #1839
2010-07-24 10:51:17 +02:00
Daniel Marjamäki
9b49202da8
Refactoring Tokenizer::syntaxError
2010-07-24 10:39:01 +02:00
Daniel Marjamäki
dd07d82c34
Refactoring MathLib: Report errors through the tokenizer. Ticket: #1839
2010-07-24 10:25:03 +02:00
Daniel Marjamäki
84e576de04
Refactoring: use MathLib add/sub instead of calculate
2010-07-24 10:13:45 +02:00
Daniel Marjamäki
3ad8f98c61
Refactoring: Settings::addSuppression return error message and callers make sure it's reported properly. Ticket: #1839
2010-07-23 23:12:56 +02:00
Daniel Marjamäki
5c771adece
Refactoring: Use Check::reportError instead of writing to std::cout. Ticket: #1839
2010-07-23 22:53:29 +02:00
Daniel Marjamäki
8a0d989190
Refactoring: Don't throw exceptions in the tokenizer upon errors. Ticket: #1866
2010-07-23 14:02:29 +02:00
Daniel Marjamäki
5e0a4a173a
Refactoring: The preprocessor will report errors instead of throwing exceptions. Ticket: #1866
2010-07-23 13:54:52 +02:00
Daniel Marjamäki
37c959023a
Refactoring: The Settings::addEnabled will return error message instead of throwing it. Ticket: #1866
2010-07-23 13:29:16 +02:00
Daniel Marjamäki
1b7796791b
Variable scope: Improved verbose information (see also 7ef0296
)
2010-07-23 12:29:21 +02:00
Daniel Marjamäki
e1612bc175
Fixed #1891 (Internal error when enum assigned to sizeof without brackets)
2010-07-22 22:21:12 +02:00
Daniel Marjamäki
f69109fbf6
Fixed #1828 (### Internal error in Cppcheck. Please report it.)
2010-07-22 19:57:48 +02:00
Kimmo Varis
b4d55d8e65
Fix path separators for missing include files-message.
2010-07-21 17:00:12 +03:00
Kimmo Varis
9b0851ed25
Fixed #1892 (Verbosity setting set to false and not set back to original value)
...
Verbosity was set to false to temporarily reduce printing messages.
But it was not set back to its original value so rest of the
messages that should have been printed for verbose setting
enabled were not printed.
2010-07-21 16:26:59 +03:00
Kimmo Varis
618076a65f
Better fix for #1371 .
...
Now handles also system includes. And have couple of tests.
2010-07-21 14:16:42 +03:00
Kimmo Varis
9d29ee6edd
Use enum for header file types
2010-07-21 12:58:30 +03:00
Robert Reif
f2f5b3ebf0
Fixed #1883 (false positive: (style) The function 'A::SetPos' can be const)
2010-07-20 09:43:27 +02:00
Kimmo Varis
c25930581c
Formatting and improving comments.
2010-07-19 20:06:42 +03:00
Daniel Marjamäki
3c376047ba
pulled changes from kimmov (filelocation-refactor)
2010-07-19 18:06:49 +02:00
Zachary Blair
df1c911d84
Merge branch 'master' of github.com:danmar/cppcheck
2010-07-19 07:49:44 -07:00
Kimmo Varis
342632a618
Remove './' from begin of paths when printing progress.
2010-07-19 15:05:44 +03:00
Kimmo Varis
dc77bc69a0
Move path simplifying code to Path class.
2010-07-19 14:27:05 +03:00
Robert Reif
4cf92992a8
Fixed #1883 (false positive: (style) The function 'A::SetPos' can be const)
2010-07-19 13:16:11 +02:00
Daniel Marjamäki
d4d0bc050a
Fixed #1865 (Tokenizer::simplifyRedundantParantheses: wrong handling of 'operator delete')
2010-07-19 12:06:20 +02:00
Kimmo Varis
0485976c54
Use std::replace() to replace chars in paths.
2010-07-19 13:02:04 +03:00
Daniel Marjamäki
7ef0296f97
--verbose: added more information for the variableScope error message.
2010-07-19 11:30:01 +02:00
Kimmo Varis
c8d866b906
Merge remote branch 'remotes/kimmo/master'
2010-07-19 11:10:04 +03:00
Kimmo Varis
9f78177914
Remove unused methods from ErrorLogger.
2010-07-19 11:04:30 +03:00
Daniel Marjamäki
bbf2c6c6e6
Fixed #1880 (false positive: Uninitialized array (initialized in subfunction))
2010-07-19 10:03:54 +02:00
Kimmo Varis
95fa267c0e
Remove misleading comment.
2010-07-19 10:54:53 +03:00
Zachary Blair
9ffd06ff5e
Fixed #1856 (false positive: "pData" nulled but not freed upon failure)
2010-07-18 23:55:39 -07:00
Robert Reif
37b37218cf
Fixed #1882 (false negative: function can be declared const)
2010-07-19 08:40:46 +02:00
Robert Reif
7842658cb4
Refactoring CheckClass::initializeVarList. Ticket #1811
2010-07-18 20:58:16 +02:00
Daniel Marjamäki
e7690836fd
fixed the mistake I made when applying patch
2010-07-18 20:56:19 +02:00
Robert Reif
689de10abf
uninitialized class members: better handling of nested classes
2010-07-18 20:43:51 +02:00
Kimmo Varis
b384aabc52
Fixed #1371 (#include "foo\file.h" -> #include "foo/file.h" should be handled automatically on linux)
...
Linux can't open file paths with / separator. So we'll need to fix
such include file paths (in source files) first.
2010-07-18 20:02:18 +03:00
Daniel Marjamäki
1fb4758583
Fixed #1855 (false positive: uninitialized variable (function call in switch condition))
2010-07-18 13:19:37 +02:00
Daniel Marjamäki
020a8a965c
use cppcheckError to report Tokenizer/Preprocessor error instead of std::cerr
2010-07-18 12:57:29 +02:00
Daniel Marjamäki
a4b887f21a
Fixed #1843 (Tokenizer::createTokens() calls std::exit(0))
2010-07-18 12:44:55 +02:00
Daniel Marjamäki
c16b5d6f3a
Fixed #1857 (XML tag no more included for unusedFunction error (1.44 regression))
2010-07-18 11:22:26 +02:00
Kimmo Varis
006c9f17d4
GUI: Avoid unnecessary path separator conversion.
2010-07-18 11:20:10 +03:00
Robert Reif
81a053aa90
Fixed #1311 (false negative: missing const not found in derived classes)
2010-07-18 10:18:41 +02:00
Kimmo Varis
6903f61f69
Update Visual Studio projects.
2010-07-17 17:59:47 +03:00
Kimmo Varis
5d1a10b0a3
Astyle cleanup.
2010-07-17 17:42:17 +03:00
Kimmo Varis
3c12d23fd9
Add Path class for path handling routines.
...
In this initial commit the Path class contains two methods for
converting path separators. I want to move cppcheck path handling
to direction that we internally have paths with / separator. And
convert from/to native separators when needed.
2010-07-17 17:38:36 +03:00
Robert Reif
9c4bbd4c65
Fixed #1730 (False negative in 'variable not initialized in ctor')
2010-07-17 12:26:05 +02:00
Robert Reif
ad9d1375aa
Fixed #1875 (CheckClass::getVarList: simplify function use)
2010-07-17 12:25:14 +02:00
Kimmo Varis
6db365e6f7
Improve path name handling in ErrorLogger.
...
This commit adds setfile() method to FileLocation class. The setfile
method converts in Windows path separators to internally used Unix
separators. And getfile() converts path separators back to Windows
separators. This fixes bugs that error reports had mixed path
separators in paths.
2010-07-17 01:27:40 +03:00
Kimmo Varis
6362e50e73
Fix comment.
2010-07-16 22:47:46 +03:00
Kimmo Varis
3fa4e8a1d5
Remove unused ErrorLogger::_writemsg() methods.
2010-07-16 21:40:02 +03:00
Robert Reif
d72365ab00
Fixed #1375 (false negative: uninitialized member variables not found in nested class constructors)
2010-07-15 10:16:16 +02:00
Kimmo Varis
ad0394939a
Refactor ErrorMessage constructor to take Severity::SeverityType.
...
This removes lots of unneeded casting as everybody now uses the
Severity::SeverityType.
2010-07-14 23:11:32 +03:00
Kimmo Varis
d811970531
Merge remote branch 'remotes/kimmo/severity-refactor'
2010-07-14 22:29:02 +03:00
Kimmo Varis
ba5017cf05
Add debug-severity to Severity::SeverityType.
2010-07-14 21:12:54 +03:00
Kimmo Varis
f54f28530b
Make Severity::none to match and output empty string.
2010-07-14 21:12:54 +03:00
Kimmo Varis
5f8af2e1e8
Refactor ErrorMessage's severity to Severity::SeverityType.
2010-07-14 21:12:39 +03:00
Robert Reif
fd352865ca
CheckClass: Improvements and refactorings for constructors and variables checking
2010-07-14 19:00:52 +02:00
Daniel Marjamäki
a6b6022497
Fixed #1851 (false positive: Member variable not initialized int ctor)
2010-07-14 18:50:29 +02:00
Kimmo Varis
fa0f6edacf
Rename ErrorMessage::toText() to ErrorMessage::toString().
2010-07-14 18:31:05 +03:00
Kimmo Varis
05adb285c5
Rename Severity::stringify() to Severity::toString().
2010-07-14 17:40:18 +03:00
Kimmo Varis
3716b3f9d8
Rename Severity::e to Severity::SeverityType.
2010-07-14 17:30:03 +03:00
Daniel Marjamäki
bea714445a
Fixed #1850 (An access to a nested std::map via a negative integer key is reported as 'Array index out of bounds')
2010-07-14 12:24:07 +02:00
Daniel Marjamäki
233432a888
gcc: fixed compiler warning (suggest parantheses)
2010-07-14 09:46:08 +02:00
Daniel Marjamäki
a1ce80806e
Fixed #1844 (False positive: invalid iterator when erase() is used in if-else (with continue))
2010-07-14 09:42:10 +02:00
Robert Reif
c572e6af87
Fixed #1846 (False positive with -s: Variable hides typedef with same name)
2010-07-13 08:08:12 +02:00
Robert Reif
ab088bcec9
Fixed #1847 (False positive: Method using std::swap<>() can be declared const)
2010-07-13 08:04:48 +02:00
Daniel Marjamäki
61150498c4
Variable Id: fixed issue with function call. Ticket: #1848
2010-07-12 20:18:03 +02:00
Robert Reif
e86e8449f8
Variable usage: better handling of pointer aliasing. Ticket: #1729
2010-07-12 09:50:18 +02:00
Kimmo Varis
c9215e9e44
Change the "information" error to "debug" error.
...
There was one debugging error sent with "information" severity. That
confused the GUI that didn't know such severity. Change the severity
to "debug" so the meaning of the error is more clear.
2010-07-12 00:56:52 +03:00
Daniel Marjamäki
94a8eba989
1.44: updated version information
2010-07-10 11:29:07 +02:00
Daniel Marjamäki
4b0e3edfa4
Unit Testing: Test that suppressions work
2010-07-09 13:27:15 +02:00
Daniel Marjamäki
abbd557761
Fixed #1836 (--suppresions file.txt fails due to wrong line edings)
2010-07-09 12:42:08 +02:00
Daniel Marjamäki
2531bb73d7
Fixed #1834 (False positive: invalid iterator when erase() is used in if-else)
2010-07-09 10:50:24 +02:00
Daniel Marjamäki
a60047227d
Settings: added '#include <cctype>'
2010-07-09 10:18:35 +02:00
Daniel Marjamäki
c34c3ee742
Unused functions: Refactoring
2010-07-08 13:01:53 +02:00
Daniel Marjamäki
1876cd482b
Suppressions: Validate given id
2010-07-08 12:06:27 +02:00
Daniel Marjamäki
11a72461f3
Fixed #1835 (false positive: uninitialized variable when using ?)
2010-07-08 11:16:49 +02:00
Robert Reif
566b4b4beb
Variable usage: fixed false positive reported in #1729
2010-07-08 08:42:34 +02:00
Robert Reif
2d6dfa57e1
Variable usage: Better aliasing support (Ticket #1729 )
2010-07-08 08:00:50 +02:00
Daniel Marjamäki
49626e427e
Realloc: changed the error message. I think it's better to mention realloc in the message.
2010-07-07 20:28:15 +02:00
Daniel Marjamäki
a1793edabe
Fixed #1825 (*log(0) error)
2010-07-07 09:03:40 +02:00
Daniel Marjamäki
4ebf4caf66
Variable usage: only warn about variables that have variable id > 0
2010-07-07 08:50:34 +02:00
Daniel Marjamäki
2bb07a55bd
Fixed #1803 (False positive: unused variable: this)
2010-07-07 08:39:18 +02:00
Daniel Marjamäki
a107cd1b59
Fixed #1729 (False positive: variable is assigned a value that is never used (pointer aliasing))
2010-07-07 08:26:24 +02:00
Robert Reif
b0f1d5669b
Fixed #1829 (### Internal error in Cppcheck. Please report it.)
2010-07-07 07:40:11 +02:00
Daniel Marjamäki
dc2a0a6468
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
2010-07-06 21:36:50 +02:00
Daniel Marjamäki
1b20f8d27d
Fixed #1824 (false positive: unitialised variable)
2010-07-06 13:18:28 +02:00
Robert Reif
1799e4a575
Fixed #1827 (### Internal error in Cppcheck. Please report it.)
2010-07-06 08:26:30 +02:00
Robert Reif
c949a29d1e
Fixed #1821 (simplifyTypedef: better typedef support)
2010-07-05 23:03:54 +02:00
Daniel Marjamäki
18a75edd20
Fixed #1823 (tokenize && wrong)
2010-07-05 22:41:02 +02:00
Daniel Marjamäki
b02fc037ed
Buffer Overrun: Fixed false positive when variable is reassigned in called function
2010-07-05 22:19:27 +02:00
Daniel Marjamäki
ae3557fa92
Fixed #1820 (False positive: memory leak (auto deallocated class))
2010-07-05 14:01:25 +02:00
Daniel Marjamäki
b173d5f117
Fixed #1817 (False positive: Resource leak (casting))
2010-07-05 13:16:33 +02:00
Daniel Marjamäki
c811acaa50
Fixed #1818 (False positive: Dangerous usage of strncpy (copying a constant string))
2010-07-05 12:45:39 +02:00
Robert Reif
28c265b20c
Fixed #1821 (simplifyTypedef: better typedef support)
2010-07-02 15:22:29 +02:00
Daniel Marjamäki
3205775eb9
Fixed #1790 (mismatching allocation/deallocation false positive)
2010-06-30 09:21:15 +02:00
Zachary Blair
5ea28ccbba
Fixed #157 (Forgetting to put a break in a switch statement)
2010-06-30 00:10:30 -07:00
Daniel Marjamäki
c6888845a0
Fixed #1815 (False positive: uninitialized variable when using ? operator)
2010-06-30 08:28:34 +02:00
Robert Reif
b33fb48618
Fixed #1816 (Tokenizer: remove restrict keyword)
2010-06-30 08:10:39 +02:00
Daniel Marjamäki
76133e0234
Class checking: Fixed FP for static arrays (not initialized in constructor)
2010-06-29 12:51:18 +02:00
Robert Reif
4668359b51
Fixed #1808 (false positive: uninitialized variable with multiple assignment)
2010-06-29 08:38:24 +02:00
Daniel Marjamäki
46e2f1e64b
--author=Robert Reif <reif@earthlink.net>
...
Fixed #1814 (false positive: Variable hides typedef with same name)
2010-06-28 15:33:27 +02:00
Daniel Marjamäki
f82895c1f2
Fixed #1809 (false positive: uninitialized variable with nested if)
2010-06-26 17:15:44 +02:00
Robert Reif
539804369a
Fixed #1811 (false positive: Uninitialized variable)
2010-06-26 07:50:53 +02:00
Daniel Marjamäki
ad0908cb3f
Fixed #1808 (false positive: uninitialized variable with multiple assignment)
2010-06-25 19:39:30 +02:00
Robert Reif
38f90dae09
Fixed #1813 (false negative: Member variable not assigned a value in operator=)
2010-06-25 07:52:12 +02:00
Daniel Marjamäki
9fd89d3bdc
Fixed #1495 (False -s positive: Member variable not assigned a value in operator=)
2010-06-24 20:09:26 +02:00
Robert Reif
2a1edff77f
Fixed #1812 (false negative: functionVariableUsage doesn't support static variables)
2010-06-24 17:00:32 +02:00
firewave
6fd4ba6e4f
Avoid Visual Studio warnings about constant expressions
2010-06-24 04:24:25 +02:00
Robert Reif
74e48d4bb1
Fixed #1732 (False positive: Variable not assigned a value (pointer to pointer))
2010-06-23 06:54:14 +02:00
Robert Reif
fac9f66cc0
Fixed #1810 (False positive: Variable 'separator' is assigned a value that is never used)
2010-06-22 17:07:41 +02:00
Robert Reif
a5b45a7f83
Fixed #1807 (false positive: Variable is not assigned a value (casting function parameters))
2010-06-22 17:04:11 +02:00
Daniel Marjamäki
d22da6088c
Fixed #1800 (false positive: memory leak when ptr used as map key)
2010-06-21 18:43:28 +02:00
Robert Reif
bdd28b47aa
Fixed #1799 (false positive: Variable is assigned a value that is never used)
2010-06-21 18:12:01 +02:00
Daniel Marjamäki
26e167fd5b
Refactoring: Removed redundant checks
2010-06-20 20:51:36 +02:00
Daniel Marjamäki
4cd3e8fdc0
Refactoring: Reduced copy/pasted code
2010-06-20 19:03:59 +02:00
Daniel Marjamäki
54b8e79cae
Preprocessor: Reduce copy/pasted code
2010-06-20 18:41:45 +02:00
Nicolás Alvarez
c76a9525c1
Change size-t to std::string::size_type.
2010-06-19 17:24:10 -03:00
Nicolás Alvarez
12d6947334
Fix build error on 64-bit systems.
2010-06-19 17:16:14 -03:00
Nicolás Alvarez
df3d98a7c2
Fix typos in sizeofsizeof error message.
2010-06-19 17:16:14 -03:00
Daniel Marjamäki
85bf4b2be6
Fixed #1795 (false positive: nullpointer dereference (needs to improve Tokenizer::simplifyKnownVariables))
2010-06-19 17:54:38 +02:00
Daniel Marjamäki
82b63dd736
Fixed #1633 (tokenizer: simplifyKnownVariable: improved handling of arithmetic)
2010-06-19 14:00:45 +02:00
Daniel Marjamäki
a402b6bb98
Fixed #1802 (Preprocessor: macros are expanded wrong)
2010-06-19 12:03:39 +02:00
Daniel Marjamäki
38c3de7343
Preprocessor: Refactoring. Broke out code that parses out the parameters from code.
2010-06-19 09:09:47 +02:00
Daniel Marjamäki
dcdbe117e6
Borland C++: Fixed compiler errors. When using 'a?b:c', Borland requires that b and c are the same type
2010-06-19 08:52:14 +02:00
Robert Reif
ec61c6fa26
Fixed #1801 (simplifyTypedef: duplicate typedefs not handled properly)
2010-06-18 07:16:05 +02:00
firewave
d6d4b99b85
Removed obsolete checkheaders from Visual Studio projects
2010-06-17 15:00:58 +02:00
Robert Reif
f116e74f6e
Fixed #1801 (Segmentation fault while scanning Qt's qcups.cpp)
2010-06-17 06:59:01 +02:00
Leandro Lisboa Penz
58a872e6a0
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
...
Detecting reallocations in the other function.
2010-06-16 22:29:55 -03:00
Daniel Marjamäki
8a6f4254e0
Fixed #853 (False positive: memory leak for member variable with unknown function)
2010-06-16 19:28:47 +02:00
Robert Reif
ee7ad272d6
variable usage: fix false positives when __attribute__ is used. Ticket: #1792
2010-06-16 18:04:31 +02:00
Robert Reif
7dba21858a
simplify the alias handling in the checking of variable usage. Ticket: #1729
2010-06-16 18:00:21 +02:00
Robert Reif
61e7e759f0
Fixed #1798 (structure templates)
2010-06-16 07:13:52 +02:00
Zachary Blair
ae2a02ad93
Applied review suggestions for Ticket #920
2010-06-15 22:03:38 -07:00
Daniel Marjamäki
dc12a9b3b5
Fixed #1545 (new check: usage of iterator pointing to invalid memory after reserve)
2010-06-15 19:53:09 +02:00
Daniel Marjamäki
a42273da63
Fixed #887 (Tokenizer: Simplify variable value after loop)
2010-06-15 17:56:14 +02:00
Daniel Marjamäki
5c00c1a539
removed the deprecated checkheaders
2010-06-15 16:56:04 +02:00
Zachary Blair
efefceabae
Fixed #920 (new style check: find empty catch blocks)
2010-06-14 23:45:46 -07:00
Robert Reif
98ae660260
Fixed #1792 (false positive: Variable 'test' is assigned a value that is never used)
2010-06-14 15:46:57 +02:00
Daniel Marjamäki
cb7e9fbec1
Fixed #1776 (False Negative: Unitialized array)
2010-06-14 08:36:34 +02:00
Daniel Marjamäki
b5d0955d11
doxygen: fixed error messages given by doxygen
2010-06-14 07:54:41 +02:00
Daniel Marjamäki
e987d2e05b
Memory leaks: more specific bailouts to reduce false negatives
2010-06-13 19:00:11 +02:00
Daniel Marjamäki
5de124280a
Fixed #1783 (false positive: uninitalized variable in constructor/operator=, when calling overloaded functions)
2010-06-13 10:23:59 +02:00
Daniel Marjamäki
70bfa890a8
Fixed #1718 (Tokenizer add close braces to for loop at wrong place when if-else presents inside)
2010-06-13 08:00:46 +02:00
Robert Reif
18bb7488b9
Fixed #1787 (false negative: out of bounds in derived class)
2010-06-13 07:17:50 +02:00
Daniel Marjamäki
76221c0916
Fixed #1510 (false positive '(possible error) Memory leak' when 'a = b = new ...; delete a' (but not b))
2010-06-12 13:37:44 +02:00
Daniel Marjamäki
f3fbdc96e1
Fixed #1788 (Tokenizer: template destructor is lost)
2010-06-12 08:32:05 +02:00
Robert Reif
3d2c28a524
Fixed #1784 (false positive: Variable is not assigned a value)
2010-06-10 07:21:47 +02:00
Robert Reif
6b65b77acf
Fixed #1782 ((error) ### Internal error in Cppcheck. Please report it.)
2010-06-10 07:18:55 +02:00
Daniel Marjamäki
e64ce2e812
Fixed #1781 (false positive: uninitialized variable when using asm statement in macro)
2010-06-09 21:28:15 +02:00
Robert Reif
00dcec47ac
Variable usage: read variable when using syntax '..=*(p);'
2010-06-08 18:26:14 +02:00
Daniel Marjamäki
472bd9dabe
Fixed #1726 (False negative: null pointer dereference in switch block)
2010-06-06 12:15:31 +02:00
Daniel Marjamäki
e140ff6e84
Memory leaks: skipping function call inside allocation
2010-06-06 11:22:59 +02:00
Daniel Marjamäki
a9196e8710
Memory leaks: Added allocation function 'g_strdup_printf'
2010-06-06 11:09:19 +02:00
Daniel Marjamäki
68ad8219ed
Fixed #1722 (Member variable initialized in call to base class constructor)
2010-06-06 08:29:35 +02:00
Martin Ettl
f75ca79849
applied patch from php-coder from ticket 1724; removed TODO_TESTCASES;
2010-06-05 19:49:49 +02:00
Daniel Marjamäki
1de6e94947
Code coverage: Removed unused code
2010-06-05 11:25:47 +02:00
Daniel Marjamäki
07e00d57d9
Fixed #1725 (segfault in ExecutionPath::bailOutVar (probably caused by #1721 fix))
2010-06-05 09:45:35 +02:00
Leandro Lisboa Penz
4ac7da7d51
Fixed #73 (memory leaks not found when calling a function that returns allocated memory through a parameter)
2010-06-04 20:58:50 -03:00
Zachary Blair
2645e96783
Applied review suggestions for Ticket #568
2010-06-03 22:42:54 -07:00
Daniel Marjamäki
b11e23eb08
Fixed #1721 (False negative: uninitialized variable in switch block)
2010-06-03 20:02:58 +02:00
Robert Reif
4c4844b722
Fixed #1723 (Variable assigned value which is never used but is thrown)
2010-06-03 07:05:57 +02:00
Daniel Marjamäki
09e02b9f9f
updated --help output. The --enable is used to enable additional checks.
2010-06-02 21:34:03 +02:00
Daniel Marjamäki
cb43168d81
Fixed #1720 (segmentation fault of cppcheck)
2010-06-02 18:10:32 +02:00
Daniel Marjamäki
5789eb116d
astyle formatting
2010-06-02 18:09:25 +02:00
Daniel Marjamäki
8ead23fc91
CheckOther::nullConstantDereference: Fixed cppcheck warning message - tok may become null
2010-06-02 18:06:37 +02:00
Daniel Marjamäki
28ad69e4b3
Refactoring of CheckOther::nullConstantDereference
2010-06-02 17:53:45 +02:00
Zachary Blair
33b4254d33
Fixed #568 (string functions with command line arguments may overflow buffer)
2010-06-01 22:41:07 -07:00
Daniel Marjamäki
45821b3871
Fixed #1719 (False negative: memory leak (fgets in condition))
2010-05-31 18:20:34 +02:00
Daniel Marjamäki
9b1ed1112b
Memory leaks: Fixed bug in CheckMemoryLeak::functionReturnType
2010-05-30 20:30:08 +02:00
Daniel Marjamäki
08b6e6ee09
Fixed #1717 (False positive: Resource leak with while)
2010-05-30 13:15:15 +02:00
Daniel Marjamäki
83c62eca9c
Tokenizer: simplify loops that continue while errno is EINTR
2010-05-30 12:49:39 +02:00
firewave
62093d764d
Fixed Visual Studio 2010 warning
2010-05-30 10:44:03 +02:00
Daniel Marjamäki
37ae4692bb
Uninitialized variables: fixed false negative when using uninitialized variable inside malloc call
2010-05-30 10:30:51 +02:00
Daniel Marjamäki
1ec49430e3
Uninitialized variables: better handling when uninitialized variables are used in function calls
2010-05-30 09:31:10 +02:00
Daniel Marjamäki
ab41879246
ExecutionPath: Better handling of 'FOREACH (..) {}'
2010-05-30 09:00:18 +02:00
Daniel Marjamäki
f41334e58a
ExecutionPath: better handling of 'FOREACH(..){..}'
2010-05-30 08:26:44 +02:00
Daniel Marjamäki
d3ed1c8960
Refactoring uninitialized variables (checking variable declarations)
2010-05-30 08:02:39 +02:00
Daniel Marjamäki
406cbda563
Uninitialized variables: better handling of struct variables
2010-05-30 07:55:11 +02:00
Daniel Marjamäki
46b5e4e79a
Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
2010-05-29 22:20:10 +02:00
Daniel Marjamäki
0c6352a826
Memory leaks: small fixes. add checking of 'g_fopen'. don't let 'fclose' calls be interpreted as 'callfunc'
2010-05-29 21:56:18 +02:00
Daniel Marjamäki
495dfde32c
Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
2010-05-29 21:11:59 +02:00
Daniel Marjamäki
24703418bd
Fixed #1715 (switch with fallthrough and 'return' confuses cppcheck)
2010-05-29 20:55:09 +02:00
Daniel Marjamäki
d09e1df0d7
Fixed #1714 (Wrong precedence for shift operators when simplifying calculations?)
2010-05-29 20:27:08 +02:00
Daniel Marjamäki
b702b8542d
Memory leaks: enabled the leaks checking when members are not deallocated in the destructor. This checking was previously an --all check so there could be false positives.
2010-05-29 19:29:59 +02:00
Daniel Marjamäki
7601089bee
astyle formatting
2010-05-29 11:19:56 +02:00
Daniel Marjamäki
82f030df2c
the virtual destructor error message needs to be restricted. marked the checking as inconclusive for now.
2010-05-29 11:19:28 +02:00
Zachary Blair
fe1fa4022d
Merge branch 'master' of github.com:danmar/cppcheck
2010-05-28 22:53:54 -07:00
Robert Reif
1a25183e8f
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-29 07:52:06 +02:00
Zachary Blair
59086fa599
Fixed #818 (Detect sprintf buffer overrun with struct members)
2010-05-28 22:51:28 -07:00
Robert Reif
3fb0260ef1
Fixed #1713 (remove Microsoft variants of inline)
2010-05-29 07:43:58 +02:00
Robert Reif
26a7d29760
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-28 06:55:54 +02:00
Daniel Marjamäki
d3c20cac81
Fixed #1712 (False negative: dereferencing uninitialized pointer)
2010-05-27 19:00:52 +02:00
Robert Reif
dc34a1b3ff
Fixed #1711 (Wrong typedef name shown when struct declared with __attribute__)
2010-05-27 18:15:42 +02:00
Robert Reif
8881a0c361
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-27 07:00:33 +02:00
Robert Reif
176b41caa5
Fixed #1709 (char buffer that is only accessed with pointers is marker not assigned)
2010-05-26 19:22:35 +02:00
Daniel Marjamäki
d23f63c805
astyle formatting
2010-05-26 19:21:34 +02:00
Daniel Marjamäki
88e9a4ade6
Fixed #1704 (false negative: null pointer dereference)
2010-05-26 19:16:42 +02:00
Zachary Blair
619cfbc56f
Fixed #168 (buffer overflow: not enough room for the null terminator)
2010-05-26 01:56:34 -07:00
Robert Reif
019e1f9dfe
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-25 20:43:44 +02:00
Robert Reif
4306082fcf
Fixed #1708 (False positive for const)
2010-05-25 06:55:49 +02:00
Daniel Marjamäki
5692e7a6f6
Fixed #1707 (false positive: Memory leak)
2010-05-24 19:28:27 +02:00
Daniel Marjamäki
c465d824b7
Removed TODO
2010-05-24 07:32:33 +02:00
Daniel Marjamäki
78255fdfc5
Tokenizer: Removed the Tokenizer::simplifyNamespaces. Ticket: #1700
2010-05-23 13:51:41 +02:00
Robert Reif
b20cf06b66
Fixed #1671 (simplifyTypedef: support for more typedefs)
2010-05-23 10:46:39 +02:00
Robert Reif
048733a15e
false positive: Variable is assigned a value that is never used
2010-05-23 10:41:05 +02:00
Daniel Marjamäki
8f76aea6ed
2 pass checking: broke out Cppcheck::analyseFile. To be used for tests
2010-05-21 21:06:11 +02:00
Daniel Marjamäki
75c9355e9a
Added some multipass checking for the uninitialized variables. It is still experimental. You can activate it with the '--test-2-pass' switch. Some more refactorings are needed to make it truly usable, the main thing is to make it thread safe.
2010-05-21 19:35:18 +02:00
Daniel Marjamäki
4633979ff7
fixed gcc compiler warnings (comparing float values)
2010-05-21 12:28:13 +02:00
Daniel Marjamäki
89ec49508d
Fixed gcc compiler warning
2010-05-21 12:13:05 +02:00
Robert Reif
a8921afcd7
Fixed #1698 (Add define support to GUI)
2010-05-21 09:49:57 +02:00
Daniel Marjamäki
8d2e4bc553
Tokenizer: give dead pointer a value
2010-05-21 08:26:53 +02:00
Robert Reif
78614b8dc1
Fixed #1699 (False positive: The function '...' can be const)
2010-05-20 17:45:10 +02:00
Robert Reif
5dfbb38dc9
#1697 (false positive: The function can be const)
2010-05-20 06:52:59 +02:00
Daniel Marjamäki
c31accc52a
Fixed #1695 (Ticket #1614 is broken using latest from git)
2010-05-19 19:23:09 +02:00
Daniel Marjamäki
6815f4e941
printchecks: better explanation of its purpose. I call it from gdb when I debug ExecutionPaths.
2010-05-18 20:58:11 +02:00
Daniel Marjamäki
1792395654
astyle formatting
2010-05-18 20:08:27 +02:00
Daniel Marjamäki
f87eb774eb
Fixed #1646 (False positive: array access after return cannot have default loop value)
2010-05-18 19:55:23 +02:00
firewave
2bced1d90c
Avoid some Visual Studio warnings
2010-05-18 19:19:15 +02:00
Robert Reif
41c43c1790
Fixed #1691 (False positive: Function parameter 'x' is passed by value. It could be passed by reference instead.)
2010-05-18 18:20:11 +02:00
Zachary Blair
1539c0b3d2
Fixed #1649 (add a warning for potential memory leaks when using realloc)
2010-05-17 22:46:48 -07:00
Robert Reif
0d7474042a
Fixed #1685 (segmentation fault of cppcheck)
2010-05-18 07:11:23 +02:00
Robert Reif
9dfbd3946a
Fixed #1673 (Tokenizer::simplifyTypedef causes segfault for boost library)
2010-05-17 19:58:27 +02:00
Daniel Marjamäki
f8442391af
astyle formatting
2010-05-17 19:51:35 +02:00
Daniel Marjamäki
453adb4ea4
Tokenizer: it is bad to do: 'tok->previous()->deleteThis()'
2010-05-17 19:50:36 +02:00
Monika Lukow
71e5c56bf9
Fixed #1418 (false negative: buffer access out of bounds)
2010-05-16 23:53:42 +02:00
Erik Lax
20289b1f5b
Fixed #1683 (false positive: The function can be const)
2010-05-16 20:26:32 +02:00
Daniel Marjamäki
56d176e1ce
Fixed #1684 (false positive: buffer access out of bounds when using extern variable declaration)
2010-05-16 20:21:22 +02:00
Daniel Marjamäki
4c6858fa9c
Refactoring: Removed 'possibleError'
2010-05-16 19:57:41 +02:00
Daniel Marjamäki
d0e122079f
Refactoring: Removed possibleError messages from CheckMemoryLeaks
2010-05-16 19:55:16 +02:00
Erik Lax
19aaa32a99
Fixed #1688 (Tokenizer::simplifyKnownVariables and pointer assignments)
2010-05-16 19:38:44 +02:00
Daniel Marjamäki
01034cd48d
Refactoring: Removed 'possible error' message about cin
2010-05-16 19:09:36 +02:00
Daniel Marjamäki
26fab24de4
Refactoring: Removed some inconclusive checking in CheckBufferOverrun
2010-05-16 15:30:39 +02:00
Daniel Marjamäki
6edb2e77b4
Refactoring: Removed Severity::possibleStyle
2010-05-16 14:43:42 +02:00
Daniel Marjamki
5fe2a56b41
doc: updated docs about -D command line flag
2010-05-16 08:48:03 +02:00
Daniel Marjamki
14b27f97fa
Fixed #1212 (Allow giving used defines in command line)
2010-05-16 07:38:29 +02:00
Daniel Marjamki
d7b117402c
Code cleanup: Removed autodealloc handling
2010-05-16 07:15:31 +02:00
Daniel Marjamki
8e3c39ae5b
Fixed #1678 (false positive: Member variable not initialized in the constructor, for arrays of undefined type)
2010-05-15 20:24:11 +02:00
Erik Lax
c0149d3cd1
Fixed #1679 (Bad iterators checks fails to detect bugs with indent levels)
2010-05-15 20:00:41 +02:00
Erik Lax
0510d9a2b0
Fixed #1680 (Bad iterators checks fail to detect invalidation of iterator for deletion by value)
2010-05-15 19:46:42 +02:00
Daniel Marjamki
70d20ac544
Fixed #1681 (false negative: memory leak in operator =)
2010-05-15 19:40:32 +02:00
Daniel Marjamki
972046c4bd
Added test CheckOther::sizeofsizeof. Inspired by #1682
2010-05-15 14:06:45 +02:00
Daniel Marjamki
85afa86da3
astyle formatting
2010-05-14 18:40:37 +02:00
Daniel Marjamki
8b1ffefd74
Fixed #1682 (Internal error)
2010-05-14 18:40:15 +02:00
Konrad Windszus
c39f80d361
Ticket #1318 : Make sure error ids are unique
2010-05-13 22:14:29 +02:00
Robert Reif
f8cceface5
Fixed #1677 (False positive: (style) Variable 'xxx' is assigned a value that is never used)
2010-05-13 13:59:41 +02:00
Martin Ettl
1382832bd0
mathlib:isInt() now handles calles of 'u' and 'l' correctly; testcases added
2010-05-12 23:49:09 +02:00