Commit Graph

241 Commits

Author SHA1 Message Date
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Daniel Marjamäki e9b4ea44a2 Refactoring: Disable inconclusive checks. They can still be activated for debugging/testing purposes 2010-04-10 14:05:33 +02:00
Daniel Marjamäki 21717e05cd Refactoring: use more specific conditions instead of std::isupper. Only the A-Z are interesting. This also fixes compiler errors. 2010-04-10 09:46:50 +02:00
Daniel Marjamäki d360c01675 Fixed #1579 (False positive: function can be const when return type is unknown) 2010-04-09 19:15:39 +02:00
Daniel Marjamäki 1328a57103 Fixed #1584 (False positive: (static) Member variable not assigned a value in operator=) 2010-04-09 18:35:54 +02:00
Daniel Marjamäki 1b81a9d435 Fixed #1537 ('Unused private function' when using pointer to member function) 2010-04-08 19:06:54 +02:00
Reijo Tomperi 7caaee3739 Fix some of the warnings that appear with -Wshadow 2010-04-06 22:53:05 +03:00
Reijo Tomperi 5aa88ee5a2 Fix vs warnings. Apply patch from kidkat. 2010-04-06 21:35:21 +03:00
Daniel Marjamäki f8367da1fd Refactoring: broke out copy/pasted code 2010-04-03 09:17:16 +02:00
Daniel Marjamäki 427d155644 Fixed #1527 (Function can't be const if it has non-const operator overload call) 2010-04-02 22:03:07 +02:00
Robert Reif 805c683c1a Cleanup: Removed unneeded code 2010-04-02 18:55:27 +02:00
Robert Reif 3507b06e0b Fixed #1563 (false positive: function can be const (assignment to static)) 2010-04-02 08:02:47 +02:00
Robert Reif 1dcbf02bd8 Fixed #1553 (false positive : uninitialized variable for struct timeval from <sys/time>) 2010-04-02 07:36:18 +02:00
Daniel Marjamäki 0cad22314e Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup. 2010-04-02 07:30:58 +02:00
Martin Ettl 193aa7d1d3 astyle fix 2010-04-02 02:21:53 +02:00
Robert Reif 2825773918 Fixed #1552 (false positive: function can be const (array of struct)) 2010-04-01 17:01:52 +02:00
Robert Reif 2c5fb55c3b Fixed #1551 (false positive: The function 'A::vSet' can be const) 2010-04-01 16:59:35 +02:00
Robert Reif a8c9aa1f8d Fixed #1550 (Improve check: Assignment to self) 2010-04-01 16:40:12 +02:00
Robert Reif 78e54e17f2 Unit testing: Added test case for memset. Ticket: #1538 2010-03-31 19:53:53 +02:00
Robert Reif 7fb5b9b67b Better checking for assignment to self. Ticket: #1550 2010-03-31 17:09:59 +02:00
Daniel Marjamäki c213227133 Fixed #1535 (False positive: member variable not initialized, struct with constructor) 2010-03-29 20:34:47 +02:00
Robert Reif 62d2845014 Fixed #1492 (false negatives: array index out of bounds) 2010-03-28 15:56:13 +02:00
Robert Reif 2dc4222c9a Refactoring: Added CheckClass::isMemberFunc 2010-03-28 11:46:42 +02:00
Daniel Marjamäki 16124ce646 Fixed #1516 (C++Builder properties mistaken for uninitialized variables) 2010-03-28 10:58:03 +02:00
Martin Ettl e4bda66b28 extended The function can be const test 2010-03-27 14:11:46 +01:00
Robert Reif 2eceaaefc0 Fixed #1519 (false negative: the function can be declared as const) 2010-03-26 20:14:31 +01:00
Robert Reif 45865f54a8 Fixed #1525 (false negative: the function can be declared as const (member declared as mutable)) 2010-03-26 19:06:00 +01:00
Robert Reif 307000b448 Fixed #1529 (false positive: function can be const (struct member variable)) 2010-03-26 18:16:33 +01:00
Daniel Marjamäki 258e7e292e Fixed #1496 (false positive: Member variable not initialized in the constructor 'X::m_d') 2010-03-26 17:19:33 +01:00
Robert Reif a1528d3154 Fixed #1522 (false positive: function can be const (assignment in return)) 2010-03-26 16:30:30 +01:00
Robert Reif e95bc41e59 Fixed #1522 (false positive: function can be const (assignment in return)) 2010-03-24 19:31:30 +01:00
Robert Reif 9808a59cc1 Fixed #1515 (false positive: The function 'wxThreadInternal::SetExitCode' can be const) 2010-03-23 07:37:20 +01:00
Robert Reif 637a34bfd2 Fixed #1517 (false negative: the function can be declared as const) 2010-03-23 07:34:34 +01:00
Robert Reif 92fe14e7f0 Fixed #1491 (False positive when putting an access specifier at the end of a class declaration) 2010-03-19 17:40:23 +01:00
Robert Reif 89c57c72c5 small const fix 2010-03-16 07:31:40 +01:00
Daniel Marjamäki 9fe9be1ea9 Fixed #1465 (false positive: unintialized class member) 2010-03-13 20:24:39 +01:00
Robert Reif 846a3a0186 Fixed #1491 (False positive when putting an access specifier at the end of a class declaration) 2010-03-13 08:06:20 +01:00
Robert Reif f552ca5462 Fixed #1482 (Improve check const-function: function can be made const when assignment not to member variable (false negative)) 2010-03-12 18:30:20 +01:00
Robert Reif 09ab841789 Fixed #1486 (--errorlist shows two identical id values) 2010-03-10 07:47:01 +01:00
Daniel Marjamäki dbc235bd39 Function constness: I don't think it's necessary to show both definition and implementation location. I changed so only the location of the definition is shown. This fixes #1486. 2010-03-09 07:29:03 +01:00
Robert Reif 7c283d1321 Fixed #1321 (Improve check const-function: function that is not implemented inline can be made const) 2010-03-05 17:06:25 +01:00
Robert Reif 0da133f8a0 Fixed #1451 (false positive: operator = should return reference to self) 2010-02-25 07:26:59 +01:00
Daniel Marjamäki 8f4edb5e45 Fixed #1409 (False positive: Buffer access out-of-bounds with strncpy and an array in typedef'ed struct) 2010-02-21 15:23:50 +01:00
Daniel Marjamäki d5611a1a06 Fixed #1426 (false positive: returning LPVOID can be const) 2010-02-21 10:19:28 +01:00
Daniel Marjamäki d0348fa57a Fixed #1403 (false positive: The function can be const) 2010-02-20 09:55:51 +01:00
Robert Reif 9e61e7dda8 Fixed #1405 (false positive: operator = should return reference t 2010-02-17 22:46:03 +01:00
Daniel Marjamäki 9394816fcf Refactoring: Use std::string instead of const char * 2010-02-14 19:58:17 +01:00
Daniel Marjamäki 0a6aa0f094 Fixed #1376 (Member variable not initialized in the constructor false positive) 2010-02-10 19:28:51 +01:00
Robert Reif 9591e09dd0 Fixed #1344 (false negative: missing const not found) 2010-02-08 07:25:19 +01:00
Daniel Marjamäki fb09b2fd37 Fixed #1356 (Double-False positive: uninitialized variable) 2010-02-07 13:34:39 +01:00
Daniel Marjamäki 9e6ea07c14 CheckClass::noMemset: Refactoring so it handles more complex std template types 2010-02-04 21:49:58 +01:00
Daniel Marjamäki da7e75f69e Class checking: Minor refactoring when analysing memset on class 2010-02-04 20:53:04 +01:00
Daniel Marjamäki 9943262da0 Fixed #1287 (Use of memset on struct - std template types not handled) 2010-02-04 19:40:35 +01:00
Reijo Tomperi 6e48f57826 Remove debug print 2010-01-29 23:24:16 +02:00
Reijo Tomperi 1d5ba4e320 Improved updateClassList(), but not yet took it into use.
findClassFunction is now non-static.
updateClassList usage is currently commented out as it doesn't handle class inside a function
2010-01-29 23:22:18 +02:00
Daniel Marjamäki f561441d90 Fixed #1319 (false negative: missing const not found) 2010-01-29 19:38:56 +01:00
Robert Reif 94c5d92b2b Fixed #1323 (segfault with style in CheckClass::operatorEqRetRefThis()) 2010-01-29 16:04:27 +01:00
Daniel Marjamäki e12d115e9a Fixed #1312 (false positive: missing const message on functions returning references) 2010-01-25 21:40:57 +01:00
Daniel Marjamäki 7ce4825f95 Fixed #1308 (False positive: The function 'x' can be const for a static member function) 2010-01-24 18:26:39 +01:00
Daniel Marjamäki 25ba399a50 const class functions: refactorings 2010-01-24 13:45:56 +01:00
Daniel Marjamäki b4b97e5706 const: fixed false positive when using increment/decrement 2010-01-24 13:33:30 +01:00
Daniel Marjamäki a0d8f44603 CheckClass: The operator< etc member functions can often be const 2010-01-23 22:36:04 +01:00
Daniel Marjamäki aab05524e5 Fixed #1305 (False positive: The function 'x' can be const when indirectly calling a non-const member) 2010-01-23 21:08:40 +01:00
Daniel Marjamäki 9a6b450501 Fixed #1304 (False positive: The function 'x' can be const when modifing a member) 2010-01-23 20:59:20 +01:00
Daniel Marjamäki 5b76be4935 Fixed #1303 (False positive: The function 'x' can be const for a constructor) 2010-01-23 20:47:29 +01:00
Daniel Marjamäki fb10396cb3 only run CheckClass::checkConst if style checking is on 2010-01-23 09:38:35 +01:00
Daniel Marjamäki 35c303943f Partial fix for #13 - detect simple cases of member functions that can be const 2010-01-23 09:19:22 +01:00
Daniel Marjamäki e9c8e1d8b1 doxygen and minor refactorings 2010-01-22 19:29:24 +01:00
Daniel Marjamäki 59de7934b7 Fixed #643 (Member variable not initialized not detected if any unknown function called) 2010-01-22 18:51:25 +01:00
Daniel Marjamäki 96359b14ff Simplify function pointers 2010-01-20 21:19:06 +01:00
Daniel Marjamäki 81ca6e9f98 Revert "minor tweak in Borland C++ project file"
This reverts commit ad06ee4f71.
2010-01-16 08:47:46 +01:00
Daniel Marjamäki ad06ee4f71 minor tweak in Borland C++ project file 2010-01-16 08:17:40 +01:00
Daniel Marjamäki 2de49129dc Fixed #1259 (false postive: Member variable 'A::b' is not assigned a value in 'A::operator=') 2010-01-12 21:36:40 +01:00
Robert Reif 60ef3ef872 Fixed #1233 (false positive: operator = should check for assignment to self) 2010-01-08 19:15:24 +01:00
Daniel Marjamäki 485f3c7708 Fixed #1221 ([False positive] Member variable not initialized with operator[] gives wrong result) 2010-01-06 19:04:15 +01:00
Robert Reif e6cc897e29 Fixed #1224 (segmentation fault of cppcheck) 2010-01-05 21:55:33 +01:00
Robert Reif 2a546dc9c0 Fixed #1184 (improve test: operator =) 2010-01-03 08:26:02 +01:00
Robert Reif bcafb30d0d Fixed #1211 (add struct support for constructor checks) 2010-01-02 17:29:55 +01:00
Robert Reif 12641e2d76 Fixed #1184 (improve test: operator =) 2009-12-31 13:44:03 +01:00
Robert Reif 3a46ef0487 Fixed #1176 (void operator = check doesn't support struct) 2009-12-30 18:40:02 +01:00
Daniel Marjamäki 58e85d55e3 astyle formatting 2009-12-29 07:50:33 +01:00
Daniel Marjamäki 905533552d Robert Reif: Fixed #1164 (only first void operator = found) 2009-12-29 07:48:37 +01:00
Daniel Marjamäki 74b9bccd07 code cleanup 2009-12-20 09:02:25 +01:00
Daniel Marjamäki e7c0e4d482 Fixed #1093 (False positive: missing constructor) 2009-12-19 17:58:52 +01:00
Daniel Marjamäki 01cfa3b6bd Fixed #1072 (False positive: class member initialization with '*p=0;') 2009-12-13 09:36:59 +01:00
Daniel Marjamäki 4d185f0935 Fixed #1080 (false positive: member variable not initialized) 2009-12-11 21:34:04 +01:00
Daniel Marjamäki c2a37c5d69 class checking: It's a 'possible style' error if a private constructor is not initializing a member variable 2009-12-06 18:35:32 +01:00
Daniel Marjamäki 39614a699e Uninitialized variables: detect uninitialized pointer array 2009-11-10 19:35:54 +01:00
Daniel Marjamäki c301dc1907 Fixed #928 (false positive: member variable not initialized in constructor) 2009-11-10 19:30:37 +01:00
Reijo Tomperi 80c66f8ebc Fix #895 (false positive: Suspicious pointer subtraction)
http://sourceforge.net/apps/trac/cppcheck/ticket/895
2009-11-04 21:36:27 +02:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00