Commit Graph

80 Commits

Author SHA1 Message Date
Daniel Marjamäki ffac9281c4 astyle formatting 2009-07-18 20:35:22 +02:00
Slava Semushin d3490abd64 Finally fixed ticket #284 (style check: redundant condition improvement)
http://sourceforge.net/apps/trac/cppcheck/ticket/284
2009-07-18 21:42:08 +07:00
Daniel Marjamäki 7d35447d80 refactoring: renamed the severity "all" to "possible error" 2009-07-13 10:16:31 +02:00
Daniel Marjamäki 89115bd417 doc: added more information when '--verbose' is used for these error messages:
* dangerous usage of erase
 * overlapping data buffer
2009-07-08 12:57:36 +02:00
Reijo Tomperi 8b0e481d46 Refactoring: Rename member functions to follow naming guidelines. 2009-07-05 23:16:43 +03:00
Daniel Marjamäki 8a3ec4549b Fixed #425 (False positive: usage of char variable.. c = c & 0x03)
Using char variables in bit operations are ok if:
 * the result is stored in a char
 * the variable is and'ed with a number that is less than 0x100
2009-06-20 19:24:58 +02:00
Reijo Tomperi b7171c3cd2 Fix ticket #413 (false positive: C-style pointer casting for pure virtual function)
http://sourceforge.net/apps/trac/cppcheck/ticket/413
2009-06-18 23:26:21 +03:00
Daniel Marjamäki 35b6b2588e Fixed ticket #374 (False positive: The scope of variable can be limited)
A few refactorings and fixes were made
2009-06-12 16:17:51 +02:00
Daniel Marjamäki a71d260308 Refactoring: Moved CheckOther::returnPointerToLocalVariable to CheckAutoVariables 2009-06-09 19:45:58 +02:00
Reijo Tomperi 58eda6e978 Fix ticket #325 (Replace developer names in source files with AUTHORS file)
http://apps.sourceforge.net/trac/cppcheck/ticket/325
2009-05-30 08:48:12 +03:00
Daniel Marjamäki 650d58e3de Fix for ticket 337 ('scope can be limited' false positive with variables referenced by pointers) 2009-05-27 19:38:26 +02:00
Slava Semushin f5300ae56c Part of fix for ticket #284 (style check: redundant condition improvement)
Fixed case "if (p) delete [] p;" and also added test case for it.

http://apps.sourceforge.net/trac/cppcheck/ticket/284
2009-05-24 00:32:53 +07:00
Slava Semushin bc62472a18 Part of fix for ticket #284 (style check: redundant condition improvement)
Fixed case "if (p != NULL) delete p;" and also added test case for it.

http://apps.sourceforge.net/trac/cppcheck/ticket/284
2009-05-24 00:30:27 +07:00
Slava Semushin 4bd1c3fb00 Propagate static and const modifiers.
No functional change.
2009-05-22 21:20:32 +07:00
Daniel Marjamäki f182365bd2 Applied patch 0001-Use-Token-simpleMatch-instead-of-Token-Match-w
Author: php-coder

Ticket: http://apps.sourceforge.net/trac/cppcheck/ticket/323
2009-05-21 17:55:52 +02:00
Daniel Marjamäki 1ae24066fe null pointer dereferencing: check that its a pointer that is dereferenced to avoid false positives when using classes that behave almost like pointers (#295) 2009-05-10 08:43:16 +02:00
Daniel Marjamäki e26c999020 Refactoring: Using MathLib for converting string to number
commit beacd5793f9e9987432a20ac39a76ae6c2c8babd
Author: Daniel Marjamäki <hyd_danmar@users.sourceforge.net>
Date:   Sat May 2 10:44:18 2009 +0200

    memleak: using mathlib

commit 4d28172a5d88cc2cbe5ed94a4e4fdbd0dd4bb5e1
Author: Daniel Marjamäki <hyd_danmar@users.sourceforge.net>
Date:   Sat May 2 10:35:06 2009 +0200

    tokenizer: using the MathLib for converting string to number

commit 4e4b95b3554c9c6d121efeb39741204b1621b1a3
Author: Daniel Marjamäki <hyd_danmar@users.sourceforge.net>
Date:   Sat May 2 10:28:39 2009 +0200

    CheckOther: Using mathlib
2009-05-02 10:45:15 +02:00
Daniel Marjamäki ca8f25fced return pointer to local array: fixed false positive when return value is converted to for instance a std::string (#255) 2009-04-19 16:47:54 +02:00
Daniel Marjamäki 263c5b9e5a division with zero => division by zero 2009-03-29 20:27:10 +02:00
Daniel Marjamäki d7aee72fcd zero division: it's an error 2009-03-29 18:47:05 +02:00
Daniel Marjamäki 4059a2ad05 added check for zero division. The code was written by Nguyen Duong Tuan 2009-03-28 07:49:47 +01:00
Daniel Marjamäki c0b608059a possible null pointer dereference after a while-loop 2009-03-27 17:19:34 +01:00
Daniel Marjamäki afcaa30b51 Fixed ticket 216 (False positive: variable scope) 2009-03-24 20:59:56 +01:00
Daniel Marjamäki 586037ed11 fixed testcase 2009-03-24 20:28:44 +01:00
Daniel Marjamäki da0b571aee Fixed ticket 197 (false positive: condition is always true/false) 2009-03-24 19:49:01 +01:00
Daniel Marjamäki 44c952873e Fixed ticket 205 (False positive: char variable used in bit operation) 2009-03-23 19:04:51 +01:00
Daniel Marjamäki 468ed653e2 refactoring error messages 2009-03-21 17:58:13 +01:00
Daniel Marjamäki 9f1c3cc535 refactoring the rest of the classes 2009-03-20 18:16:21 +01:00
Daniel Marjamäki 9c057c707b tokenize negative numbers into a single token 2009-03-17 20:50:06 +01:00
Reijo Tomperi fc8f47145a Copyrights updated 2009-03-01 19:52:33 +00:00
Leandro Penz 62a49282eb Incomplete statements: removed false positive when setting array of structures or multi-dimensional arrays. 2009-02-12 12:59:43 +00:00
Leandro Penz 4c93b4928b Incomplete statement: fixed and enabled intarray test case. 2009-02-11 15:17:13 +00:00
Reijo Tomperi fb3c81dcd9 Fix ticket #80 (refactoring: classes ErrorMessage and ErrorLogger), note that errormessage and errorlogger were merged, errormessage.* is no more. 2009-02-08 21:20:35 +00:00
Daniel Marjamäki 05e330ed38 incomplete statement: minor update 2009-02-05 18:57:53 +00:00
Daniel Marjamäki aeb573d529 returning pointer to local array 2009-02-04 18:49:19 +00:00
Daniel Marjamäki bd73d0913f charvar: fixed todo testcase 2009-02-04 17:12:53 +00:00
Daniel Marjamäki d29d7e60a9 errmsg: refactoring the error messages 2009-02-01 15:47:36 +00:00
Daniel Marjamäki d6ef44c73e sprintf overlapping data 2009-01-27 07:21:52 +00:00
Daniel Marjamäki 6ce23670e5 sprintf overlapping data: added extra text that is shown if --verbose is given 2009-01-26 19:14:46 +00:00
Daniel Marjamäki 9d29de02d3 removed windows encodings 2009-01-23 21:34:03 +00:00
Daniel Marjamäki 42e56153a4 borland and visual c++ fixes 2009-01-23 21:28:45 +00:00
Reijo Tomperi 8d6f41397a Fixing ticket #35 (Get rid of #ifdefs in our code where possible) 2009-01-23 20:25:13 +00:00
Nicolas Le Cam 42c608b6f0 Remove checks that are already covered well by most compilers (Unreachable Code; Assignment in Condition; Unused Variable). 2009-01-21 21:31:47 +00:00
Reijo Tomperi 176dd41306 Fixed Ticket #40, Check copyright texts in files, now that we have new developers. 2009-01-21 20:04:20 +00:00
Nicolas Le Cam afb3bf1011 Fix CheckOther::functionVariableUsage, passing a variable to a function also means reading it. 2009-01-21 19:05:57 +00:00
Nicolas Le Cam acdc381ff3 CheckOther::functionVariableUsage: minor optimization. 2009-01-20 22:40:10 +00:00
Nicolas Le Cam 2b2152919f Update errormessage.h and code using it. 2009-01-19 19:50:59 +00:00
Reijo Tomperi 50d9a085da Added temporary bailout code, cppcheck crashes when string checking leaks out. This needs a better fix, this is just to
see the problem more easily.
2009-01-18 22:46:48 +00:00
Nicolas Le Cam f6d121443e unreachableCode: Moved warning of a break statement following a return in --style; Added a test case; Minor optimization. 2009-01-18 21:19:02 +00:00
Leandro Penz e930525aa4 functionVariableUsage: no longer SIGSEGVs on unfinished struct. Fixes Ticket #31. 2009-01-18 19:45:43 +00:00