Commit Graph

534 Commits

Author SHA1 Message Date
Daniel Marjamäki 38e7209d26 Fixed #2373 (Using XML2 in --errorlist output) 2010-12-29 12:43:29 +01:00
Robert Reif 137d0e2ba7 typedef: fixed problem with 'typedef int pread_f(int);'. ticket: #2348 2010-12-29 09:18:41 +01:00
Robert Reif e82b1f8946 typedef: fix typedef simplification. ticket: #2348 2010-12-28 21:21:13 +01:00
Daniel Marjamäki 0667fcf53c Fixed #2355 (simplifyTypedef: wrong simplification of 'typedef FMAC1 void (*a)();') 2010-12-28 14:04:44 +01:00
Robert Reif 1b92eeae1e Fixed #2354 (simplifyTypedef: function pointers are not simplified into valid code) 2010-12-28 08:01:32 +01:00
Daniel Marjamäki 92acca3d0c Fixed #2368 (assigned a value that is never used) 2010-12-27 20:49:07 +01:00
Daniel Marjamäki 2367cfcf1e Fixed #2361 (false positive on t[0X10]) 2010-12-27 08:09:05 +01:00
Daniel Marjamäki 6178459c15 Fixed #2304 (Tokenizer::simplifyKnownVariables: known strcpy parameter) 2010-12-26 20:34:07 +01:00
Daniel Marjamäki f4581d833d Tokenizer: Bailout if @ is encountered in the code 2010-12-26 15:07:14 +01:00
Daniel Marjamäki 10ee43790d Fixed #2339 (Tokenizer::setVarId : Wrong handling of 'int gr = id - (TLFPressProperties::OIL_FLUID * nb);') 2010-12-25 12:40:44 +01:00
Daniel Marjamäki 6f8f0e1aa1 Fixed #2353 (Tokenizer::simplifyKnownVariables: wrong simplification after return) 2010-12-25 10:07:57 +01:00
Daniel Marjamäki 18fd12006a Tokenizer::simplifyGoto: Don't simplify 'goto' inside unhandled macro calls. Ticket: #2348 2010-12-23 22:03:58 +01:00
Daniel Marjamäki 472ecd8805 Tokenizer: Fixed calculation simplification of '0*(*p)'. Ticket: #2348 2010-12-23 18:59:18 +01:00
Robert Reif fc7e2d1ac1 Fixed #2341 (false positive for function pointer returning typedef) 2010-12-22 18:37:23 +01:00
Daniel Marjamäki f392dbef95 Fixed #2338 (False positive: Deallocating a deallocated pointer) 2010-12-22 08:24:50 +01:00
Daniel Marjamäki 41ac2c252f Fixed #2325 (Tokenizer: Remove for-loop if condition is false) 2010-12-18 21:43:12 +01:00
Daniel Marjamäki 8ffc2b0ac6 Tokenizer: better handling for switch/break in the simplifyKnownVariables. Ticket: #2324 2010-12-18 11:14:31 +01:00
Daniel Marjamäki 7eb9855104 Tokenizer: Remove redundant parantheses in rhs. Ticket: #2320 2010-12-18 09:44:58 +01:00
Daniel Marjamäki 845d1491f9 Fixed #2307 (No constructor defined false positive when class is enclosed in namespace) 2010-12-17 20:56:46 +01:00
Daniel Marjamäki 2d97189486 Fixed #2311 (False positive: Index out of bounds) 2010-12-16 20:16:59 +01:00
Robert Reif bf136f0123 Fixed #2314 (False positive: (style) Template instantiation 'Foo' hides typedef with same name) 2010-12-16 07:48:46 +01:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Daniel Marjamäki 69bacde479 Tokenizer: Cleanup redundant statement '; x = x + 0;'. Ticket: #2283 2010-12-09 19:35:52 +01:00
Robert Reif b6acfa809b Symbol database: creates a single symbol database within Tokenizer on demand and changes all checks to use it 2010-12-07 07:08:49 +01:00
Robert Reif 6c719c5806 Symbol database: removed unnecessary null pointer checks 2010-12-07 07:07:07 +01:00
Daniel Marjamäki 0b696b7079 Fixed #2280 (Tokenizer::setVarId : variable id not set for inner iterator) 2010-12-06 17:52:44 +01:00
Daniel Marjamäki ab336b9088 Tokenizer: Added a few comments 2010-12-04 15:49:25 +01:00
Robert Reif b29568c81d Fixed #2271 (Tokenizer: simplify Qt signals and slots) 2010-12-03 08:14:09 +01:00
Robert Reif eda4bcae29 Fixed #2271 (Tokenizer: simplify Qt signals and slots) 2010-12-02 17:41:49 +01:00
Robert Reif f12c0c7ada Tokenizer: add assert(_settings) to Tokenizer to insure the tokenizer always has settings. Ticket: #2219 2010-12-01 18:00:55 +01:00
Daniel Marjamäki add8584612 Fixed #2232 (segmentation fault of cppcheck) 2010-11-29 17:46:10 +01:00
Daniel Marjamäki 00da0adf25 Fixed #2236 (False positive: Assignment to itself) 2010-11-28 11:48:06 +01:00
Daniel Marjamäki ea405d95c6 Fixed #2241 (Segfault checking a file) 2010-11-28 07:35:42 +01:00
Daniel Marjamäki 0a744c0c6e Fixed #2234 (Variable is assigned a value that is never used) 2010-11-25 18:16:11 +01:00
Daniel Marjamäki 22a4dd2cc3 Fixed #2225 (false positive: variable is assigned a value that is never used '*(stack[0])+=arg') 2010-11-23 20:35:08 +01:00
Robert Reif 1842a122da reuse symbol database in checkmemoryleak.cpp. ticket: #2219 2010-11-23 18:41:07 +01:00
Daniel Marjamäki bb745da5f9 Tokenizer::simplifyKnownVariables: suppress debug warnings about pointer aliases. Temporary solution that limits the amount of debug warnings somewhat. 2010-11-21 13:50:57 +01:00
Daniel Marjamäki 9d88e17c39 Tokenizer::simplifyKnownVariables: Reduce debug-warnings for conditional increment 2010-11-21 13:40:42 +01:00
Daniel Marjamäki 0fe4249cfc Fixed #2216 (wrong warning when C++0x keyword delete is used) 2010-11-20 17:20:25 +01:00
Daniel Marjamäki e8ca76e02e Fixed #2200 (MathLib: Calculation overflow) 2010-11-20 10:05:33 +01:00
Daniel Marjamäki 378e83e73d Fixed #2201 (false positive: Uninitialized variable: __v0) 2010-11-14 17:35:22 +01:00
Daniel Marjamäki 71c1ce71ce Tokenizer::simplifyKnownVariables: Simplify known variables for struct members 2010-11-13 18:45:35 +01:00
Daniel Marjamäki 667cc8f6e5 Tokenizer: Skip debug warnings in Tokenizer::simplifyKnownVariables for loop variable 2010-11-13 16:40:04 +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 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 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 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
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 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 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 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 1323cbdb6d Fixed #2160 (#2160 (Invalid unused variable report (style))) 2010-11-03 19:30:00 +01:00
Daniel Marjamäki dd4b2b8b46 Tokenizer: simplify 'x[0] += 1;' 2010-11-02 19:22:48 +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 3fb17baa12 Fixed #2158 (False positive: value is not unused when using +=) 2010-11-01 17:36:54 +01:00
Daniel Marjamäki 6c19ea7b53 Tokenizer: Added a few comments 2010-10-31 09:58:44 +01:00
Daniel Marjamäki 23d3fd3a5a Fixed #2147 (uninitialized variable: false negative for 'x += y;') 2010-10-31 08:47:13 +01: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
Pete Johns 8022baec2a Removed unnecessary code duplication. 2010-10-27 19:34:06 +11:00
Daniel Marjamäki a38b14d582 Tokenizer: Remove redundant semi colons 2010-10-26 21:05:20 +02:00
Daniel Marjamäki 6200d4505a Fixed #2118 (Invalid syntax error report.) 2010-10-26 19:39:48 +02:00
Daniel Marjamäki 6a66d32871 JAVA: better handling of java code 2010-10-20 22:15:35 +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 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
Robert Reif 267d1f273e Fixed #2082 (Tokenizer::simplifyTypedef: wrong handling of array) 2010-10-13 20:02:37 +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
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 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 e4c3b390cc Fixed #2069 (cppcheck fails to scan OpenBSDs ftp source code) 2010-10-02 13:28:44 +02:00
Pete Johns 9a9302cba1 Prevent Tokenizer::simplifyCalculations() from removing parantheses from calls to Functors. 2010-10-02 21:19:05 +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 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 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 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