Commit Graph

1009 Commits

Author SHA1 Message Date
Reijo Tomperi 21eaadbe31 Fixed several bugs from previous commits and added check code that will print errors if varid is 0 when %varid% is given in Match(). 2009-01-04 20:33:12 +00:00
Reijo Tomperi 3dd3bad0ec Refactoring: findMatch() that supports varId added. %var1% -> %varid% changed 2009-01-04 19:55:12 +00:00
Daniel Marjamäki 066e03b00a MinGW: Applied the patch submitted by kidkat that makes cppcheck compilable with MinGW 2009-01-04 18:46:45 +00:00
Daniel Marjamäki 9294e20e96 variable usage: fixed false positive when using operator '^' 2009-01-04 18:38:24 +00:00
Reijo Tomperi 651e295343 Made previous feature request fix more portable 2009-01-04 18:31:36 +00:00
Daniel Marjamäki 68d501db58 variable usage: The check must be made before simplifyTokenList to avoid false positives 2009-01-04 18:28:05 +00:00
Reijo Tomperi 0c06d757cc Fix for feature request: [ 2485706 ] Add support to *.C file extension 2009-01-04 18:19:57 +00:00
Daniel Marjamäki de60f3b9ad Variable usage: Addon to previous commit. Also handle "&=" and "^=" 2009-01-04 17:44:23 +00:00
Daniel Marjamäki bf98b14b4f unused variable: Fixed false positive when using '|=' assignment 2009-01-04 17:41:59 +00:00
Daniel Marjamäki dcd64a7ce6 Variable usage : Fixed false positives for struct/union member variables 2009-01-04 17:35:19 +00:00
Daniel Marjamäki dcc15d7f22 Variable usage: Fixed false positive with operators ~ and ! 2009-01-04 17:27:32 +00:00
Daniel Marjamäki 9ea852eb0e Variable usage: Fixed false positives (tmp1 ? tmp2 : tmp3) 2009-01-04 17:23:04 +00:00
Daniel Marjamäki 76e2aea0f5 variable usage: added a test case to make sure usage in a if is seen 2009-01-04 17:09:55 +00:00
Daniel Marjamäki 445230f3ae Variable usage : Fixed false positive with modulo 2009-01-04 16:42:10 +00:00
Daniel Marjamäki f8c44507e6 Variable usage: Fixed a segmentation fault 2009-01-04 16:30:25 +00:00
Daniel Marjamäki 53cd729ccc Struct member usage : Check union member variables at the same time 2009-01-04 15:05:00 +00:00
Daniel Marjamäki 0f4dd5ea7b Variable usage: fixed false positives for union member variables 2009-01-04 15:02:22 +00:00
Daniel Marjamäki a4d7ce1620 struct member usage: fixed false positives 2009-01-04 14:55:18 +00:00
Reijo Tomperi be2a10bfb6 Refactoring var1 -> varid 2009-01-04 14:46:52 +00:00
Daniel Marjamäki dd914c0089 Function usage : Fixed false positives for inline structs 2009-01-04 08:16:07 +00:00
Daniel Marjamäki 68d08b73b6 Variable usage : Fixed a false positive for ("b = (int)a;" => a is read) 2009-01-04 07:49:41 +00:00
Daniel Marjamäki f79b06b5a0 tokenize : Removed unneeded variable 2009-01-04 07:14:46 +00:00
Daniel Marjamäki 7d59985d88 Refactoring : Changed a 'strcmp' to a 'simpleMatch' 2009-01-04 07:08:56 +00:00
Reijo Tomperi e097232e99 Possibly bug fix, changed %var% into %var1% as name was also given as a parameter to Match(). Not sure which was intended here. 2009-01-03 21:07:37 +00:00
Reijo Tomperi 1594f453cc Refactoring: Changed order of parameters in Match() and findMatch() (deprecated parameter moved to last) 2009-01-03 21:05:47 +00:00
Reijo Tomperi fee4d77e7b Refactoring: %var1% -> %varid% 2009-01-03 20:53:12 +00:00
Reijo Tomperi 5d1d267624 Refactoring: Rename class "TOKEN" to "Token" 2009-01-03 20:29:20 +00:00
Daniel Marjamäki 2f9c73ce82 Buffer overrun: Moved the "buffer overrun" and "array index out of bounds" to "--all" because there were false positives 2009-01-03 15:22:53 +00:00
Reijo Tomperi 6850441c4a ErrorMessage class added (not used yet and it is still unfinished) 2009-01-03 13:51:55 +00:00
Daniel Marjamäki 2e23b09a05 Refactoring : Removed a short commented code that I never use anyway 2009-01-03 07:55:05 +00:00
Daniel Marjamäki 2b3a987552 Using freed memory : Fixed false positive when usage is something like: printf("free %x",p); 2009-01-03 07:47:35 +00:00
Daniel Marjamäki b756158644 Memory leak : Fixed a regression and added a test case 2009-01-03 07:40:09 +00:00
Reijo Tomperi f099796a10 Copyright 2007-2008 -> 2007-2009 2009-01-02 19:02:35 +00:00
Reijo Tomperi 8f55e38ea6 Refactoring: Constructor of TOKEN changed to use initialization list
instead of assignment.
2009-01-02 18:36:03 +00:00
Daniel Marjamäki 80e35e7332 Preprocessor : Replace "#if defined(.." with "ifdef .." where possible 2009-01-02 18:27:50 +00:00
Daniel Marjamäki 0e219ec24b Memory leak : Added test case "if10" which is similar to "if9" 2009-01-02 08:16:32 +00:00
Daniel Marjamäki 8ff5124233 Memory leak: Improved the checking of usage after free (if str is freed then "char c = str[0];" is illegal) 2009-01-02 08:00:12 +00:00
Daniel Marjamäki cc569d164d Memory leak: Renamed the test case "func12" to "if9" 2009-01-02 07:44:49 +00:00
Nicolas Le Cam 0c2f90dceb Memory leak : Add a new test that currently fail to highlight a regression 2009-01-02 01:29:07 +00:00
Nicolas Le Cam e29ead375f Preprocessor: Get rid of an unused parameter 2009-01-02 00:13:24 +00:00
Nicolas Le Cam 08cd1894ee Preprocessor: Get rid of an unused parameter 2009-01-02 00:06:27 +00:00
Nicolas Le Cam 2e439d8cea Memory leak : Completly fix false positive when using callbacks (Bug 2458510) 2009-01-02 00:05:08 +00:00
Reijo Tomperi 5b42b5777e Refactoring: i++; changed to ++i; 2009-01-01 23:43:23 +00:00
Reijo Tomperi 94923cca1a Refactoring: Prefer ++i; over i++; 2009-01-01 22:22:28 +00:00
Daniel Marjamäki ca550fb03e Memory leak : Changed the handling of "realloc" a little. The "getcode" will return "realloc" instead. And this will be converted to "dealloc;alloc;" before simplifycode 2009-01-01 18:42:32 +00:00
Daniel Marjamäki 35cdb6b0ba Memory leak : a little different handling when the callstack gets too big 2009-01-01 16:10:10 +00:00
Daniel Marjamäki b7b737c8f2 Memory leak : fixed false positive when there are recursive calls. (using memory after it has been freed) 2009-01-01 11:02:30 +00:00
Daniel Marjamäki 0b69a13205 Memory leak : Fixed false positives for "memory is used after it has been freed" 2009-01-01 10:14:52 +00:00
Daniel Marjamäki 784fc0d33e Memory leak : Fixed a bug in getcode (assignment) 2009-01-01 10:02:53 +00:00
Daniel Marjamäki 9a3696cb6f TOKEN: Renamed TOKEN::setstr to TOKEN::str 2009-01-01 09:37:07 +00:00