Commit Graph

545 Commits

Author SHA1 Message Date
Robert Reif 5984b6b53f fix (False positive Technically the member function 'A::foo' can be const) 2011-02-20 20:01:54 -05:00
Robert Reif fef1142997 fix (False positive: 'operator=' should return reference to self) 2011-02-19 20:02:16 -05:00
Robert Reif e6eb160395 fix [B#2589 (segmentation fault of cppcheck (struct B : A)) 2011-02-19 14:38:00 -05:00
Daniel Marjamäki 53aaf22633 CheckClass::noMemset: Added TODO test case 2011-02-16 21:31:35 +01:00
Robert Reif 2aefa5deb5 fix (segmentation fault of cppcheck) 2011-02-12 15:35:48 -05:00
Daniel Marjamäki 26f017e9c6 scripts: added tabs.pl - in my opinion it is bad to use tabs inside string constants. spaces or \t should be used instead. 2011-02-05 12:53:28 +01:00
Robert Reif c592ccd35d Fixed (segmentation fault of cppcheck) 2011-02-05 08:59:59 +01:00
Robert Reif f87056fca3 Fixed (segmentation fault of cppcheck) 2011-02-04 20:19:49 +01:00
Robert Reif 8288c28b3f Fixed (segmentation fault of cppcheck) 2011-02-03 07:57:10 +01:00
Pete Johns 098f0bf3e6 Fixed (Make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)?...
Removed replaced EXPECTED with...

WANTED (to-be):     The future expected value.
CURRENT (as-is):    Documenting how cppcheck behaves now.

This removes the need for an ASSERT_EQUALS but enforces the check for every TODO_ASSERT_EQUALS.
2011-01-30 23:20:11 +11:00
Daniel Marjamäki 524498e439 Tokenizer: collapse operator function names into a single token. ticket: 2011-01-27 18:44:20 +01:00
Robert Reif 767e01e24a Fixed (Crash when trying to analyze files (CheckClass::checkReturnPtrThis)) 2011-01-21 19:54:41 +01:00
Pete Johns 38c37ad2d8 Moved array declaration detection into isVariableDeclaration() 2011-01-17 08:36:52 +11:00
Robert Reif 0f6644e1ea Symbol database: Refactorings 2011-01-16 11:18:12 +01:00
Robert Reif 79b9939610 Fixed (False positive: not initialised variable, but there is default constructor for it.) 2011-01-15 07:59:37 +01:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Robert Reif 5f078da7ad Fixed (segmentation fault of cppcheck) 2011-01-07 18:58:14 +01:00
Robert Reif 03a484554c Fixed (false positive: Member variable not initialized in constructor calling assignment operator) 2011-01-06 07:56:34 +01:00
Daniel Marjamäki 033e759c39 command line: added 'information' id to enable 2011-01-05 21:20:21 +01:00
Markus Elfring e459ed1de3 Fixed (mistakable warning from 'CheckClass::uninitVarError') 2011-01-03 19:03:42 +01:00
Daniel Marjamäki 3c238882a2 Fixed TODO testcase. Use symbol database instead of token list. Ticket: 2011-01-01 17:54:37 +01:00
Pete Johns 502cfe7243 Fixed ("The function 's::f' can be const" reported for pointer-to-pointer)
Moved check for pointer variables into isVariableDeclaration()

Can now handle multiple scopes and multiple levels of indirection. Simplified check for strucs and unions, too, reducing the size of getVarList().

skipScopeIdentifiers() and skipPointers() should probably be methods on class Token.
2010-12-31 22:12:32 +11:00
Pete Johns 5d0ace3a50 Fixed (Technically the member function xxx can be const)
TODO: Add unit test for getVarList() and refactor variable check.

[Removed my testcase for  and removed two TODOs.]
2010-12-30 17:56:28 +11:00
Ettl Martin ac42c0ba3b const correctness: added further testcases for increment/decrement member functions 2010-12-30 02:05:44 +01:00
Ettl Martin 7b92378c3a ticket 2377: added further testcases 2010-12-30 01:44:46 +01:00
Ettl Martin c29824fc49 added todo testcase for ticket 2377 Technically the member function xxx can be const 2010-12-30 01:29:09 +01:00
Robert Reif 3f1f50e970 simplifyTypedef: operator typedef. Ticket: 2010-12-29 20:22:06 +01:00
Daniel Marjamäki 3853f93b34 TestClass: addon for 12f28507, fix a few more error messages. 2010-12-27 08:22:21 +01:00
Kimmo Varis 12f2850777 Improve the message about const function.
See discussion thread:
https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192
2010-12-26 23:44:03 +02:00
Daniel Marjamäki be46d453c4 Information: Added new severity 2010-12-22 19:53:17 +01:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Robert Reif 980a90071c Fixed (Improve check: Function can be const) 2010-12-07 19:42:30 +01:00
Robert Reif c20b8831ee Fixed (False Positive: Member variable not initialized in the constructor) 2010-12-04 20:24:13 +01:00
Robert Reif 04b811b74f Fixed (False Positive: Member variable not initialized in the constructor) 2010-12-04 17:47:00 +01:00
Robert Reif 2cd8bc74cc Symbol database: The symbol database has a bug where it can find an out of line constructor when looking for a destructor. Ticket: 2010-12-03 07:35:06 +01:00
Robert Reif 1bc8a2b6ba Fixed (False positive: struct is not initialized in constructor) 2010-12-02 07:35:01 +01:00
Robert Reif f12c0c7ada Tokenizer: add assert(_settings) to Tokenizer to insure the tokenizer always has settings. Ticket: 2010-12-01 18:00:55 +01:00
Robert Reif 43dcc51752 Fixed (segmentation fault with enable=all) 2010-11-30 19:52:42 +01:00
Robert Reif f90236a183 Fixed (segmentation fault with enable=all) 2010-11-30 19:40:32 +01:00
Kimmo Varis 87b69a10fa Ticket (Improve no constructor-message).
Improve the message about missing constructor but having class
attributes. Have proper short and long messages.
2010-11-27 10:17:03 +02:00
Robert Reif 03b12c5494 Fixed (segmentation fault of cppcheck) 2010-11-25 07:43:39 +01:00
Robert Reif 08b86e0b7e Fixed (False positive: Claims function can be const when it can not be (shared_ptr)) 2010-11-25 07:15:33 +01:00
Robert Reif f1eef49fcb Fixed (segmentation fault of cppcheck) 2010-11-23 07:31:15 +01:00
Robert Reif 36b03bdd3e Fixed (Segmentation fault in assignment operator) 2010-11-09 06:58:19 +01:00
Daniel Marjamäki c2bf3647a4 Fixed (segmentation fault of cppcheck) 2010-11-08 19:47:19 +01:00
Robert Reif 662cd27f87 Symbol database: fixed problem 2010-11-06 20:27:12 +01:00
Robert Reif 003f99da82 Symbol database: Fixed bug. Ticket: 2010-11-04 06:58:37 +01:00
Robert Reif cf0403434d Symbol database: Bug fix 2010-11-03 20:33:07 +01:00
Robert Reif 0fe72839d8 Symbol Database: Better handling of namespaces. Ticket: 2010-11-02 18:30:57 +01:00
Daniel Marjamäki fee20bafa0 Java: Removed bailout added in 120073f000 2010-10-28 18:01:51 +02:00
Robert Reif b6aca47e11 Fixed (Uninitialized member variable not detected 'std::vector<int> *ints;') 2010-10-27 19:28:15 +02:00
Robert Reif 5a8f490f07 Fixed (False positive 'Can be const') 2010-10-27 19:25:34 +02:00
Daniel Marjamäki cf86e11d05 Fixed (Class methods writing to a union are detected as 'can be const') 2010-10-24 16:43:10 +02:00
Daniel Marjamäki 120073f000 Java: fixed false positives about uninitialized variable 2010-10-23 10:56:30 +02:00
Daniel Marjamäki 92a1e9e76e Severities: Added 'warning' and 'performance' severities. No changes to the command line options nor to the XML format. Ticket: 2010-10-17 14:41:00 +02:00
Robert Reif a58094e827 Fixed (False negative: Function can be const (calling const function)) 2010-10-13 07:26:41 +02:00
Robert Reif 907ed0ac6f Fixed (False negative: function can be const when member variable is compared) 2010-10-12 07:57:09 +02:00
Daniel Marjamäki 14f12e0647 Fixed (false negative: member variable not intialized) 2010-10-10 07:57:26 +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
Robert Reif 0153dccb66 Symbol database: Skip bail out in constructors if a virtual function might be called because that would be undefined behaviour. Ticket: 2010-09-14 07:16:53 +02:00
Robert Reif 6de1711515 Symbol database: reduce false negatives for 'uninitialized variable' when calling base class function. ticket: 2010-09-12 22:40:51 +02:00
Robert Reif 69afc0a0db Symbol database: fixed false positive. ticket: 2010-09-11 08:23:30 +02:00
Robert Reif c3762903a9 Symbol database: fixed false negative for uninitialized variable. ticket: 2010-09-09 07:21:51 +02:00
Robert Reif b5276ce9e5 Symbol database: Added todo testcase for better namespace handling. Ticket: 2010-09-03 06:17:34 +02:00
Daniel Marjamäki eb74bfc15a Fixed (False positive: member variable not initialized (Borland C++ property)) 2010-09-01 18:10:12 +02:00
Robert Reif 4153b7d24b refactoring namespace handling. ticket: 2010-09-01 16:47:53 +02:00
Robert Reif 7a8190e188 Fixed (Wrong operator() parsing) 2010-09-01 06:32:46 +02:00
Robert Reif e39dda4eed const functions: Added unit test for ticket 2010-09-01 06:18:09 +02:00
Robert Reif 5aab602709 Fixed (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 (segmentation fault of cppcheck with bitfield) 2010-08-31 17:51:10 +02:00
Robert Reif 96d73c189c Symbol database: better handling of operator functions. Ticket: 2010-08-30 17:14:20 +02:00
Robert Reif a862e982ff Fixed (False negatives: uninitialised variables in constructor) 2010-08-29 16:36:10 +02:00
Robert Reif 7b2b844b8e Fixed (False positive: function can be const (get this)) 2010-08-20 19:47:41 +02:00
Robert Reif 66de0d8f72 Fixed (False positive: function can be const (derived class)) 2010-08-20 07:28:31 +02:00
Daniel Marjamäki cfa7b4906e Symbol database: bug fixes. Ticket: 2010-08-18 22:42:04 +02:00
Robert Reif cc079462dd Symbol database: fixed problems with namespaces. Ticket: 2010-08-16 18:55:39 +02:00
Daniel Marjamäki e1d6320a55 quick fix for (false positive: the function '...' can be declared as const (member array is assigned)) 2010-08-15 08:30:21 +02:00
Robert Reif 7c18ece65d Symbol database: Fixed bug when end of namespace wasn't found. Ticket: 2010-08-14 08:16:53 +02:00
Robert Reif db78c3acdf Symbol database: fixed linenr problem in virtual destructors check 2010-08-13 23:57:53 +02:00
Robert Reif ab7bb876f9 Symbol database: Refactoring virtual destructors check. Ticket: 2010-08-13 18:34:02 +02:00
Robert Reif 47c776247a Symbol database: fix a small bug and add more tests. ticket: 2010-08-12 07:38:27 +02:00
Robert Reif 988b43d419 const function check: Added more unit tests 2010-08-10 07:48:09 +02:00
Robert Reif 0b41d822cb Virtual destructors: extended and fixed the testing 2010-08-09 21:22:46 +02:00
Robert Reif bf1352c573 Fixed typo in testcase. Ticket: 2010-08-09 17:57:07 +02:00
Robert Reif 217b9425b5 Fixed (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: 2010-08-09 17:50:26 +02:00
Daniel Marjamäki 262885f3e0 Fixed (false positive: the function '...' can be declared as const (inline friend)) 2010-08-07 16:08:44 +02:00
Daniel Marjamäki 050011d287 Fixed (false positive: The function '...' can be const (nonconst code is hidden inside #if)) 2010-08-07 13:08:36 +02:00
Robert Reif 0bb07e6947 Create a symbol database 2010-07-26 16:46:37 +02:00
Robert Reif f2f5b3ebf0 Fixed (false positive: (style) The function 'A::SetPos' can be const) 2010-07-20 09:43:27 +02:00
Robert Reif 4cf92992a8 Fixed (false positive: (style) The function 'A::SetPos' can be const) 2010-07-19 13:16:11 +02:00
Robert Reif 37b37218cf Fixed (false negative: function can be declared const) 2010-07-19 08:40:46 +02:00
Robert Reif 81a053aa90 Fixed (false negative: missing const not found in derived classes) 2010-07-18 10:18:41 +02:00
Robert Reif 9c4bbd4c65 Fixed (False negative in 'variable not initialized in ctor') 2010-07-17 12:26:05 +02:00
Robert Reif d72365ab00 Fixed (false negative: uninitialized member variables not found in nested class constructors) 2010-07-15 10:16:16 +02: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 (false positive: Member variable not initialized int ctor) 2010-07-14 18:50:29 +02:00
Robert Reif ab088bcec9 Fixed (False positive: Method using std::swap<>() can be declared const) 2010-07-13 08:04:48 +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 f3538dd574 Unit Testing: Added TODO test case for uninitialized member variable in operator=. Ticket: 2010-06-25 07:56:40 +02:00
Daniel Marjamäki 9fd89d3bdc Fixed (False -s positive: Member variable not assigned a value in operator=) 2010-06-24 20:09:26 +02:00
Daniel Marjamäki 5de124280a Fixed (false positive: uninitalized variable in constructor/operator=, when calling overloaded functions) 2010-06-13 10:23:59 +02:00
Martin Ettl 2b557cee45 added a TODO testcase for ticket 1724 2010-06-06 12:46:08 +02:00
Daniel Marjamäki 68ad8219ed Fixed (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
Martin Ettl 90a3d29d70 run astyle 2010-06-03 18:23:16 +02:00
Martin Ettl 156a29815f removed a wrong const declaration 2010-06-03 12:55:56 +02:00
Martin Ettl 7b52284177 added a testcase and todo testcases for ticket 2010-06-03 12:51:42 +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
Robert Reif 4306082fcf Fixed (False positive for const) 2010-05-25 06:55:49 +02:00
Daniel Marjamäki c5b946f9b7 Unit Testing: Added a few more test cases related to ticket 2010-05-23 21:03:14 +02:00
Daniel Marjamäki bf8ef94f0c Unit Testing: Added test case for ticket 1700 2010-05-23 20:56:51 +02:00
Robert Reif 78614b8dc1 Fixed (False positive: The function '...' can be const) 2010-05-20 17:45:10 +02:00
Robert Reif 5dfbb38dc9 (false positive: The function can be const) 2010-05-20 06:52:59 +02:00
Erik Lax 20289b1f5b Fixed (false positive: The function can be const) 2010-05-16 20:26:32 +02:00
Daniel Marjamäki 6edb2e77b4 Refactoring: Removed Severity::possibleStyle 2010-05-16 14:43:42 +02:00
Daniel Marjam�ki 8e3c39ae5b Fixed (false positive: Member variable not initialized in the constructor, for arrays of undefined type) 2010-05-15 20:24:11 +02:00
Daniel Marjamäki 84c3ec9c4c Fixed (Still seeing 'possible style' warnings in 1.43) 2010-05-10 21:22:59 +02:00
Daniel Marjamäki ae576be088 refactoring: enable the 'suspicious pointer subtraction' checking 2010-05-01 21:43:47 +02:00
Zachary Blair c26e619b23 Fixed (Refactoring: move conditions into checks) 2010-04-20 23:38:25 -07:00
Robert Reif e8ac1f07d9 Unit Testing: Added TODO testcases for ticket (false negative: the function can be declared as const) 2010-04-19 21:18:53 +02:00
Robert Reif 76a683a73a Fixed (functions defined in header outside of class cannot be const) 2010-04-18 15:40:31 +02:00
Robert Reif d90f59051c Fixed (false positive: The function can be const) 2010-04-18 07:53:39 +02:00
Daniel Marjamäki c0e9a546f7 Refactoring: Refactoring the Settings class 2010-04-17 09:23:54 +02:00
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 d360c01675 Fixed (False positive: function can be const when return type is unknown) 2010-04-09 19:15:39 +02:00
Daniel Marjamäki 1328a57103 Fixed (False positive: (static) Member variable not assigned a value in operator=) 2010-04-09 18:35:54 +02:00
Robert Reif b651acfc39 Unit testing: Testing handling of Borland C++ properties 2010-04-07 19:19:28 +02:00
Robert Reif d498095fa1 Unit Testing: Better code coverage of the operator= checking 2010-04-06 18:26:29 +02:00
Daniel Marjamäki 427d155644 Fixed (Function can't be const if it has non-const operator overload call) 2010-04-02 22:03:07 +02:00
Daniel Marjamäki c6bbc9d739 Fixed (False positive: Uninitialized variable 'B::j'. There are 2 classes with the name 'B') 2010-04-02 19:29:54 +02:00
Daniel Marjamäki 4225544c82 Added TODO test case to reduce false negatives for uninitialized class members 2010-04-02 19:10:05 +02:00
Robert Reif 3507b06e0b Fixed (false positive: function can be const (assignment to static)) 2010-04-02 08:02:47 +02:00
Robert Reif 1dcbf02bd8 Fixed (false positive : uninitialized variable for struct timeval from <sys/time>) 2010-04-02 07:36:18 +02:00
Robert Reif 2825773918 Fixed (false positive: function can be const (array of struct)) 2010-04-01 17:01:52 +02:00
Robert Reif 2c5fb55c3b Fixed (false positive: The function 'A::vSet' can be const) 2010-04-01 16:59:35 +02:00
Robert Reif a8c9aa1f8d Fixed (Improve check: Assignment to self) 2010-04-01 16:40:12 +02:00
Robert Reif 78e54e17f2 Unit testing: Added test case for memset. Ticket: 2010-03-31 19:53:53 +02:00
Robert Reif 7fb5b9b67b Better checking for assignment to self. Ticket: 2010-03-31 17:09:59 +02:00
Daniel Marjamäki c213227133 Fixed (False positive: member variable not initialized, struct with constructor) 2010-03-29 20:34:47 +02:00
Robert Reif 62d2845014 Fixed (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 (C++Builder properties mistaken for uninitialized variables) 2010-03-28 10:58:03 +02:00
Reijo Tomperi a18c964efa astyle fix 2010-03-27 21:41:17 +02:00
Martin Ettl e4bda66b28 extended The function can be const test 2010-03-27 14:11:46 +01:00
Robert Reif 2eceaaefc0 Fixed (false negative: the function can be declared as const) 2010-03-26 20:14:31 +01:00
Robert Reif 45865f54a8 Fixed (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 (false positive: function can be const (struct member variable)) 2010-03-26 18:16:33 +01:00
Daniel Marjamäki 258e7e292e Fixed (false positive: Member variable not initialized in the constructor 'X::m_d') 2010-03-26 17:19:33 +01:00
Robert Reif a1528d3154 Fixed (false positive: function can be const (assignment in return)) 2010-03-26 16:30:30 +01:00
Robert Reif e95bc41e59 Fixed (false positive: function can be const (assignment in return)) 2010-03-24 19:31:30 +01:00
Robert Reif 9808a59cc1 Fixed (false positive: The function 'wxThreadInternal::SetExitCode' can be const) 2010-03-23 07:37:20 +01:00
Robert Reif 637a34bfd2 Fixed (false negative: the function can be declared as const) 2010-03-23 07:34:34 +01:00
Robert Reif 0fb680d887 Tokenizer: remove unnamed anonymous structures and unions () 2010-03-19 19:04:56 +01:00
Robert Reif 92fe14e7f0 Fixed (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 (false positive: unintialized class member) 2010-03-13 20:24:39 +01:00
Robert Reif 846a3a0186 Fixed (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 (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 (--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 . 2010-03-09 07:29:03 +01:00
Robert Reif 7c283d1321 Fixed (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 (false positive: operator = should return reference to self) 2010-02-25 07:26:59 +01:00
Daniel Marjamäki 8f4edb5e45 Fixed (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 (false positive: returning LPVOID can be const) 2010-02-21 10:19:28 +01:00
Daniel Marjamäki d0348fa57a Fixed (false positive: The function can be const) 2010-02-20 09:55:51 +01:00
Robert Reif 9e61e7dda8 Fixed (false positive: operator = should return reference t 2010-02-17 22:46:03 +01:00
Daniel Marjamäki 0a6aa0f094 Fixed (Member variable not initialized in the constructor false positive) 2010-02-10 19:28:51 +01:00
Robert Reif 9591e09dd0 Fixed (false negative: missing const not found) 2010-02-08 07:25:19 +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 (Use of memset on struct - std template types not handled) 2010-02-04 19:40:35 +01:00
Daniel Marjamäki f561441d90 Fixed (false negative: missing const not found) 2010-01-29 19:38:56 +01:00
Robert Reif 94c5d92b2b Fixed (segfault with style in CheckClass::operatorEqRetRefThis()) 2010-01-29 16:04:27 +01:00
Daniel Marjamäki e12d115e9a Fixed (false positive: missing const message on functions returning references) 2010-01-25 21:40:57 +01:00
Daniel Marjamäki 7ce4825f95 Fixed (False positive: The function 'x' can be const for a static member function) 2010-01-24 18:26:39 +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 (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 (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 (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 - detect simple cases of member functions that can be const 2010-01-23 09:19:22 +01:00
Daniel Marjamäki 59de7934b7 Fixed (Member variable not initialized not detected if any unknown function called) 2010-01-22 18:51:25 +01:00
Daniel Marjamäki 2de49129dc Fixed (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 (false positive: operator = should check for assignment to self) 2010-01-08 19:15:24 +01:00
Daniel Marjamäki 485f3c7708 Fixed ([False positive] Member variable not initialized with operator[] gives wrong result) 2010-01-06 19:04:15 +01:00
Robert Reif e6cc897e29 Fixed (segmentation fault of cppcheck) 2010-01-05 21:55:33 +01:00
Robert Reif 2a546dc9c0 Fixed (improve test: operator =) 2010-01-03 08:26:02 +01:00
Daniel Marjamäki 774e331dea Self assignment in class: added TODO test cases to reduce false positives 2009-12-31 14:03:35 +01:00
Robert Reif 12641e2d76 Fixed (improve test: operator =) 2009-12-31 13:44:03 +01:00
Robert Reif 3a46ef0487 Fixed (void operator = check doesn't support struct) 2009-12-30 18:40:02 +01:00
Daniel Marjamäki 905533552d Robert Reif: Fixed (only first void operator = found) 2009-12-29 07:48:37 +01:00
Daniel Marjamäki e7c0e4d482 Fixed (False positive: missing constructor) 2009-12-19 17:58:52 +01:00
Daniel Marjamäki 01cfa3b6bd Fixed (False positive: class member initialization with '*p=0;') 2009-12-13 09:36:59 +01:00
Daniel Marjamäki 4d185f0935 Fixed (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 (false positive: member variable not initialized in constructor) 2009-11-10 19:30:37 +01:00
Reijo Tomperi 9a55f4ca43 Add one more test case for (false positive: Suspicious pointer subtraction) 2009-11-04 21:38:40 +02:00
Reijo Tomperi 80c66f8ebc Fix (false positive: Suspicious pointer subtraction)
http://sourceforge.net/apps/trac/cppcheck/ticket/895
2009-11-04 21:36:27 +02:00
Daniel Marjamäki 319cdc2b43 Fixed (Tokenizer: The Tokenizer::simplifyTemplates doesn't handle recursive templates) 2009-11-01 19:03:52 +01:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00
Reijo Tomperi 1b1047a5e4 Fix (Change message: (style) The class 'KClass' has no constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/757
2009-09-29 21:27:17 +03:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Daniel Marjamäki c5368581d9 Fixed by (false positive: when operator is overloaded) 2009-09-16 20:07:03 +02:00
Daniel Marjamäki f4b6c822d3 Fixed (new check: Detect when using 'this-x') 2009-09-12 15:25:02 +02:00
Reijo Tomperi 7408674017 Fix (Poor var initialization assumption when can't find function definition)
http://sourceforge.net/apps/trac/cppcheck/ticket/601
Fix  ((style) Member variable not initialized in the constructor: False Positive)
http://sourceforge.net/apps/trac/cppcheck/ticket/641

This fix will also cause us not to detect several potential issues, but as there are so many
false positives, any unknown function call should stop the error for now. New
ticket is created to handle regression caused by this:
http://sourceforge.net/apps/trac/cppcheck/ticket/643
2009-09-03 23:28:00 +03:00
Reijo Tomperi 686ff425f9 Fix ticket (False positive, Using 'memset' on struct that contains a 'std::string')
http://sourceforge.net/apps/trac/cppcheck/ticket/637
2009-09-02 23:51:07 +03:00
Reijo Tomperi 7569bda227 Added few memset test cases 2009-09-02 23:32:15 +03:00
Daniel Marjamäki 03d7573208 Borland C++: Don't warn about uninitialized variables that are declared in the __published section. These are auto-initialized 2009-08-31 19:40:49 +02:00
Reijo Tomperi 929dbe92e4 Fix the last test case from ticket (array members variables are not checked in constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/613
2009-08-26 23:33:23 +03:00
Reijo Tomperi d778f67265 Fix sytax error in uninitVarArray(). This also causes the test to fail, so changing it as TODO.
See http://sourceforge.net/apps/trac/cppcheck/ticket/613
2009-08-26 00:42:07 +03:00
Daniel Marjamäki 0c479b8c9f TestClass: Added a testcase where a array member variable is initialized through strcpy 2009-08-24 17:15:29 +02:00
Reijo Tomperi c581753040 Fix ticket (array members variables are not checked in constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/613
Patch from micres
2009-08-23 22:54:41 +03:00
Reijo Tomperi 93604dd344 Fixed ticket (missing virtual destructor not detected)
http://sourceforge.net/apps/trac/cppcheck/ticket/578
2009-08-10 17:58:13 +03:00
Daniel Marjamäki 3331cb834f Hoangtuansu: Fixed (false positive::operator= should return something) 2009-08-09 19:57:48 +02:00
Reijo Tomperi 975e7778ab Fix ticket (false positive about missing virtual destructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/531
2009-08-04 22:23:22 +03:00
Slava Semushin 5dea30519c Fixed ticket (false positive::Member variable not initialized in constructor)
http://sourceforge.net/apps/trac/cppcheck/ticket/459
2009-07-17 23:50:49 +07:00
Reijo Tomperi b2474fd980 Fix ticket (Failure to detect "member var not initialized in constructor" if class inherits)
http://sourceforge.net/apps/trac/cppcheck/ticket/452
2009-07-03 21:22:14 +03:00
Slava Semushin 52a8368b02 Strip redundant std::string usage from tests.
Second round: handle empty strings.

Done by command:
git grep -l ASSERT_EQUALS | xargs sed -i 's|ASSERT_EQUALS(std::string(\(".*"\)),|ASSERT_EQUALS(\1,|'

Should be no functional change.
2009-06-05 07:43:55 +07:00
Slava Semushin 6745d9b8ef Fixed ticket (Local typedef flagged as uninitialized member)
http://apps.sourceforge.net/trac/cppcheck/ticket/358
2009-06-05 07:34:12 +07:00
Slava Semushin e5c0383594 Strip redundant std::string usage from tests.
Done by command:
git grep -l ASSERT_EQUALS | xargs sed -i 's|ASSERT_EQUALS(std::string(\(".\+"\)),|ASSERT_EQUALS(\1,|'

Should be no functional change.
2009-06-01 02:50:25 +07:00
Reijo Tomperi 58eda6e978 Fix ticket (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
Reijo Tomperi a12fd4ff5e Fix ticket (protected destructor - false positive)
http://apps.sourceforge.net/trac/cppcheck/ticket/282
2009-05-06 23:22:26 +03:00
Daniel Marjamäki 7afccc395a testing: new handling of todo test cases. If they use TODO_ASSERT_EQUALS instead we can detect when they are fixed 2009-03-25 18:31:40 +01:00
Daniel Marjamäki 5914af4481 refactoring CheckClass 2009-03-20 17:30:24 +01:00
Reijo Tomperi fc8f47145a Copyrights updated 2009-03-01 19:52:33 +00:00
Daniel Marjamäki d8927e720d constructors: don't warn about missing constructor if class only has static variable members 2009-02-21 13:35:55 +00:00
Daniel Marjamäki a9009ebf7d TestClass: Added test for uninitialized "mutable int i" 2009-02-21 08:24:57 +00:00
Reijo Tomperi d1e9efc66a Fix ticket (Change (error) Uninitialized member variable -> (style) Member variable not initialized in the constructor) 2009-02-14 08:52:03 +00:00
Daniel Marjamäki 574db37a6f uninitialized variables: added testcases and made a fix 2009-02-09 07:47:41 +00:00
Reijo Tomperi b211b8cbe8 Fix ticket (unit testing: use "protected" instead of preprocessor) 2009-02-07 20:06:00 +00:00
Reijo Tomperi a06861948b Fixed: Ticket Change (always) into (error) in error messages 2009-02-05 21:06:32 +00:00
Daniel Marjamäki 9707217c15 activated TestClass:function 2009-02-04 19:42:40 +00:00
Daniel Marjamäki 8187504cbb testclass: added todo testcase for 2009-02-04 19:31:25 +00:00
Daniel Marjamäki 3457b38d7a errmsg: write severity in the message 2009-01-31 08:33:31 +00:00
Daniel Marjamäki 8cd2979468 uninitialized member: don't check private constructors 2009-01-27 17:39:06 +00:00
Reijo Tomperi 176dd41306 Fixed Ticket , Check copyright texts in files, now that we have new developers. 2009-01-21 20:04:20 +00:00
Reijo Tomperi 58b398a4a8 Fix Ticket False positive with --style: Uninitialized member variable (when stream is used) 2009-01-17 20:17:57 +00:00
Reijo Tomperi f6452e3613 Test case for Ticket 2009-01-17 19:26:58 +00:00
Daniel Marjamäki 03cfe18c9b errmsg: Added 'condition is always true/false' 2009-01-14 19:43:28 +00:00
Daniel Marjamäki 22583269c1 Uninitialized member variables: Checking enum variables 2009-01-14 19:34:10 +00:00
Reijo Tomperi e435a1f1d6 Refactoring: Added src/ and test/ folders. Moved source files to those folders, updated makefile and codeblocks project file. 2009-01-06 14:18:36 +00:00