Commit Graph

1987 Commits

Author SHA1 Message Date
Daniel Marjamäki 08e2d91372 Fixed (option '--suppressions file' can not work when filename includes colon) 2010-08-03 17:52:03 +02:00
Daniel Marjamäki 6700351ede Fixed (memory leak detected in version 1.37 not detected in 1.43) 2010-08-02 23:04:23 +02:00
Daniel Marjamäki ff9d3d0965 memory leaks: better handling of 'loop { dealloc ; alloc ; }' 2010-08-02 22:17:09 +02:00
Daniel Marjamäki ae0252dc91 memory leaks: simplify 'callfunc ; ;' 2010-08-02 21:59:47 +02:00
Daniel Marjamäki df44703ee9 memory leaks: better checking of function calls. If there are statements after the function call it is unlikely the function call is noreturn 2010-08-02 21:56:50 +02:00
Kimmo Varis 2fa4378338 Astyle cleanup with new Astyle options. 2010-07-31 15:44:08 +03:00
Daniel Marjamäki 694325d51f Fixed (False positive: memory leak (calling noreturn function)) 2010-07-30 08:50:10 +02:00
Daniel Marjamäki 2e2baa23a6 Fixed (### Internal error in Cppcheck. Please report it) 2010-07-28 21:03:15 +02:00
Kimmo Varis 45a6742e3f Windows: Add _CRT_SECURE_NO_WARNINGS define.
The _CRT_SECURE_NO_WARNINGS define suppresses some Windows-specific
compile warnings. Windows has "secure" versions of some functions
and compiler outputs warnings that those "secure" versions should
be used instead. Since other platforms don't have those functions
we just suppress this warning for now on.
2010-07-27 17:34:13 +03:00
Zachary Blair 9f44d9eb62 Fixed (false positive: Common realloc mistake) 2010-07-26 23:17:27 -07:00
Daniel Marjamäki 7c5219324e Refactoring: Cleanup include that checkheaders reported as not needed 2010-07-26 22:05:51 +02:00
Kimmo Varis 60cf37d1ef Update VS 2010 project files. 2010-07-26 22:06:33 +03:00
Robert Reif 0bb07e6947 Create a symbol database 2010-07-26 16:46:37 +02:00
Daniel Marjamäki 29b2be19ab Fixed (Preprocessor: define - ifndef problem) 2010-07-25 15:19:25 +02:00
Daniel Marjamäki 0c65796984 Refactoring: Cleanup headers using checkheaders 2010-07-24 22:12:56 +02:00
Daniel Marjamäki 9c17114668 Fixed (false positive: dereferencing null pointer (try/catch)) 2010-07-24 14:27:18 +02:00
Daniel Marjamäki 3ad8f98c61 Refactoring: Settings::addSuppression return error message and callers make sure it's reported properly. Ticket: 2010-07-23 23:12:56 +02:00
Daniel Marjamäki 5e0a4a173a Refactoring: The preprocessor will report errors instead of throwing exceptions. Ticket: 2010-07-23 13:54:52 +02:00
Daniel Marjamäki e1612bc175 Fixed (Internal error when enum assigned to sizeof without brackets) 2010-07-22 22:21:12 +02:00
Daniel Marjamäki f69109fbf6 Fixed (### Internal error in Cppcheck. Please report it.) 2010-07-22 19:57:48 +02:00
Kimmo Varis 618076a65f Better fix for .
Now handles also system includes. And have couple of tests.
2010-07-21 14:16:42 +03:00
Kimmo Varis 9d29ee6edd Use enum for header file types 2010-07-21 12:58:30 +03:00
Robert Reif f2f5b3ebf0 Fixed (false positive: (style) The function 'A::SetPos' can be const) 2010-07-20 09:43:27 +02:00
Daniel Marjamäki 9debcb84cd filelocation-refactoring: Fixed unit tests in windows 2010-07-19 22:02:51 +02:00
Daniel Marjamäki 3c376047ba pulled changes from kimmov (filelocation-refactor) 2010-07-19 18:06:49 +02:00
Zachary Blair df1c911d84 Merge branch 'master' of github.com:danmar/cppcheck 2010-07-19 07:49:44 -07:00
Robert Reif 4cf92992a8 Fixed (false positive: (style) The function 'A::SetPos' can be const) 2010-07-19 13:16:11 +02:00
Daniel Marjamäki d4d0bc050a Fixed (Tokenizer::simplifyRedundantParantheses: wrong handling of 'operator delete') 2010-07-19 12:06:20 +02:00
Daniel Marjamäki bbf2c6c6e6 Fixed (false positive: Uninitialized array (initialized in subfunction)) 2010-07-19 10:03:54 +02:00
Zachary Blair 9ffd06ff5e Fixed (false positive: "pData" nulled but not freed upon failure) 2010-07-18 23:55:39 -07:00
Robert Reif 37b37218cf Fixed (false negative: function can be declared const) 2010-07-19 08:40:46 +02:00
Robert Reif 689de10abf uninitialized class members: better handling of nested classes 2010-07-18 20:43:51 +02:00
Martin Ettl 6cc3f76668 : added todo testcase (false positive: (error) Uninitialized variable: y) 2010-07-18 18:55:53 +02:00
Martin Ettl 5ab36d8a6d added a testcase for ticket 2010-07-18 15:13:48 +02:00
Daniel Marjamäki 1fb4758583 Fixed (false positive: uninitialized variable (function call in switch condition)) 2010-07-18 13:19:37 +02:00
Daniel Marjamäki c16b5d6f3a Fixed (XML tag no more included for unusedFunction error (1.44 regression)) 2010-07-18 11:22:26 +02:00
Robert Reif 81a053aa90 Fixed (false negative: missing const not found in derived classes) 2010-07-18 10:18:41 +02:00
Kimmo Varis 6903f61f69 Update Visual Studio projects. 2010-07-17 17:59:47 +03:00
Kimmo Varis 5d1a10b0a3 Astyle cleanup. 2010-07-17 17:42:17 +03:00
Robert Reif 9c4bbd4c65 Fixed (False negative in 'variable not initialized in ctor') 2010-07-17 12:26:05 +02:00
Kimmo Varis 6db365e6f7 Improve path name handling in ErrorLogger.
This commit adds setfile() method to FileLocation class. The setfile
method converts in Windows path separators to internally used Unix
separators. And getfile() converts path separators back to Windows
separators. This fixes bugs that error reports had mixed path
separators in paths.
2010-07-17 01:27:40 +03:00
Robert Reif d72365ab00 Fixed (false negative: uninitialized member variables not found in nested class constructors) 2010-07-15 10:16:16 +02:00
Kimmo Varis d811970531 Merge remote branch 'remotes/kimmo/severity-refactor' 2010-07-14 22:29:02 +03:00
Kimmo Varis fcfa292205 Fix tests after severity-refactor.
Now previously used testSeverity is not valid severity.
2010-07-14 21:12:54 +03: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
Kimmo Varis fa0f6edacf Rename ErrorMessage::toText() to ErrorMessage::toString(). 2010-07-14 18:31:05 +03:00
Daniel Marjamäki bea714445a Fixed (An access to a nested std::map via a negative integer key is reported as 'Array index out of bounds') 2010-07-14 12:24:07 +02:00
Daniel Marjamäki a1ce80806e Fixed (False positive: invalid iterator when erase() is used in if-else (with continue)) 2010-07-14 09:42:10 +02:00
Robert Reif c572e6af87 Fixed (False positive with -s: Variable hides typedef with same name) 2010-07-13 08:08:12 +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 61150498c4 Variable Id: fixed issue with function call. Ticket: 2010-07-12 20:18:03 +02:00
Robert Reif e86e8449f8 Variable usage: better handling of pointer aliasing. Ticket: 2010-07-12 09:50:18 +02:00
Daniel Marjamäki 4b0e3edfa4 Unit Testing: Test that suppressions work 2010-07-09 13:27:15 +02:00
Daniel Marjamäki 2531bb73d7 Fixed (False positive: invalid iterator when erase() is used in if-else) 2010-07-09 10:50:24 +02:00
Daniel Marjamäki c34c3ee742 Unused functions: Refactoring 2010-07-08 13:01:53 +02:00
Daniel Marjamäki 11a72461f3 Fixed (false positive: uninitialized variable when using ?) 2010-07-08 11:16:49 +02:00
Robert Reif 566b4b4beb Variable usage: fixed false positive reported in 2010-07-08 08:42:34 +02:00
Robert Reif 2d6dfa57e1 Variable usage: Better aliasing support (Ticket ) 2010-07-08 08:00:50 +02:00
Daniel Marjamäki 49626e427e Realloc: changed the error message. I think it's better to mention realloc in the message. 2010-07-07 20:28:15 +02:00
Reijo Tomperi b5da0b8ed2 Fixed (Cppcheck deadlock)
http://sourceforge.net/apps/trac/cppcheck/ticket/1650
2010-07-07 15:42:39 +03:00
Reijo Tomperi f5d3042635 Add more unit tests 2010-07-07 14:59:42 +03:00
Daniel Marjamäki a1793edabe Fixed (*log(0) error) 2010-07-07 09:03:40 +02:00
Daniel Marjamäki 4ebf4caf66 Variable usage: only warn about variables that have variable id > 0 2010-07-07 08:50:34 +02:00
Daniel Marjamäki 2bb07a55bd Fixed (False positive: unused variable: this) 2010-07-07 08:39:18 +02:00
Daniel Marjamäki a107cd1b59 Fixed (False positive: variable is assigned a value that is never used (pointer aliasing)) 2010-07-07 08:26:24 +02:00
Robert Reif b0f1d5669b Fixed (### Internal error in Cppcheck. Please report it.) 2010-07-07 07:40:11 +02:00
Daniel Marjamäki dc2a0a6468 Fixed (false positive: memory leak (reallocation in subfunction through parameter)) 2010-07-06 21:36:50 +02:00
Daniel Marjamäki 1b20f8d27d Fixed (false positive: unitialised variable) 2010-07-06 13:18:28 +02:00
Robert Reif 1799e4a575 Fixed (### Internal error in Cppcheck. Please report it.) 2010-07-06 08:26:30 +02:00
Robert Reif c949a29d1e Fixed (simplifyTypedef: better typedef support) 2010-07-05 23:03:54 +02:00
Daniel Marjamäki 18a75edd20 Fixed (tokenize && wrong) 2010-07-05 22:41:02 +02:00
Daniel Marjamäki b02fc037ed Buffer Overrun: Fixed false positive when variable is reassigned in called function 2010-07-05 22:19:27 +02:00
Daniel Marjamäki ae3557fa92 Fixed (False positive: memory leak (auto deallocated class)) 2010-07-05 14:01:25 +02:00
Daniel Marjamäki b173d5f117 Fixed (False positive: Resource leak (casting)) 2010-07-05 13:16:33 +02:00
Daniel Marjamäki c811acaa50 Fixed (False positive: Dangerous usage of strncpy (copying a constant string)) 2010-07-05 12:45:39 +02:00
Robert Reif 28c265b20c Fixed (simplifyTypedef: better typedef support) 2010-07-02 15:22:29 +02:00
Daniel Marjamäki 3205775eb9 Fixed (mismatching allocation/deallocation false positive) 2010-06-30 09:21:15 +02:00
Zachary Blair 5ea28ccbba Fixed (Forgetting to put a break in a switch statement) 2010-06-30 00:10:30 -07:00
Daniel Marjamäki c6888845a0 Fixed (False positive: uninitialized variable when using ? operator) 2010-06-30 08:28:34 +02:00
Robert Reif b33fb48618 Fixed (Tokenizer: remove restrict keyword) 2010-06-30 08:10:39 +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 4668359b51 Fixed (false positive: uninitialized variable with multiple assignment) 2010-06-29 08:38:24 +02:00
Daniel Marjamäki 46e2f1e64b --author=Robert Reif <reif@earthlink.net>
Fixed  (false positive: Variable hides typedef with same name)
2010-06-28 15:33:27 +02:00
Daniel Marjamäki f82895c1f2 Fixed (false positive: uninitialized variable with nested if) 2010-06-26 17:15:44 +02:00
Robert Reif 539804369a Fixed (false positive: Uninitialized variable) 2010-06-26 07:50:53 +02:00
Daniel Marjamäki ad0908cb3f Fixed (false positive: uninitialized variable with multiple assignment) 2010-06-25 19:39:30 +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
Robert Reif 38f90dae09 Fixed (false negative: Member variable not assigned a value in operator=) 2010-06-25 07:52:12 +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
Robert Reif 2a1edff77f Fixed (false negative: functionVariableUsage doesn't support static variables) 2010-06-24 17:00:32 +02:00
Robert Reif 74e48d4bb1 Fixed (False positive: Variable not assigned a value (pointer to pointer)) 2010-06-23 06:54:14 +02:00
Robert Reif fac9f66cc0 Fixed (False positive: Variable 'separator' is assigned a value that is never used) 2010-06-22 17:07:41 +02:00
Robert Reif a5b45a7f83 Fixed (false positive: Variable is not assigned a value (casting function parameters)) 2010-06-22 17:04:11 +02:00
Daniel Marjamäki d22da6088c Fixed (false positive: memory leak when ptr used as map key) 2010-06-21 18:43:28 +02:00
Robert Reif bdd28b47aa Fixed (false positive: Variable is assigned a value that is never used) 2010-06-21 18:12:01 +02:00
Martin Ettl 866d66ba78 added testcases for testing dangerous functions: mktemp 2010-06-20 13:32:00 +02:00
Nicolás Alvarez df3d98a7c2 Fix typos in sizeofsizeof error message. 2010-06-19 17:16:14 -03:00
Daniel Marjamäki 85bf4b2be6 Fixed (false positive: nullpointer dereference (needs to improve Tokenizer::simplifyKnownVariables)) 2010-06-19 17:54:38 +02:00
Daniel Marjamäki 82b63dd736 Fixed (tokenizer: simplifyKnownVariable: improved handling of arithmetic) 2010-06-19 14:00:45 +02:00
Daniel Marjamäki a402b6bb98 Fixed (Preprocessor: macros are expanded wrong) 2010-06-19 12:03:39 +02:00
Robert Reif 81403479bd Refactoring testunusedvariables. This fixes . 2010-06-18 07:19:26 +02:00
Robert Reif ec61c6fa26 Fixed (simplifyTypedef: duplicate typedefs not handled properly) 2010-06-18 07:16:05 +02:00
Reijo Tomperi 0c61454b3f Added test case deadlock_with_many_errors() for ticket
http://sourceforge.net/apps/trac/cppcheck/ticket/1650
The test case is currently commented out, because it would cause tests to hang also.
2010-06-18 00:42:01 +03:00
firewave d6d4b99b85 Removed obsolete checkheaders from Visual Studio projects 2010-06-17 15:00:58 +02:00
Robert Reif f116e74f6e Fixed (Segmentation fault while scanning Qt's qcups.cpp) 2010-06-17 06:59:01 +02:00
Leandro Lisboa Penz ad4681223b Ticket is not really fixed; added TODO. 2010-06-16 22:47:05 -03:00
Leandro Lisboa Penz 350810e3c1 Improved test of pointer argument realloc. 2010-06-16 22:46:47 -03:00
Leandro Lisboa Penz 58a872e6a0 Fixed (false positive: memory leak (reallocation in subfunction through parameter))
Detecting reallocations in the other function.
2010-06-16 22:29:55 -03:00
Daniel Marjamäki 8a6f4254e0 Fixed (False positive: memory leak for member variable with unknown function) 2010-06-16 19:28:47 +02:00
Robert Reif ee7ad272d6 variable usage: fix false positives when __attribute__ is used. Ticket: 2010-06-16 18:04:31 +02:00
Robert Reif 7dba21858a simplify the alias handling in the checking of variable usage. Ticket: 2010-06-16 18:00:21 +02:00
Robert Reif 61e7e759f0 Fixed (structure templates) 2010-06-16 07:13:52 +02:00
Daniel Marjamäki dc12a9b3b5 Fixed (new check: usage of iterator pointing to invalid memory after reserve) 2010-06-15 19:53:09 +02:00
Daniel Marjamäki a42273da63 Fixed (Tokenizer: Simplify variable value after loop) 2010-06-15 17:56:14 +02:00
Zachary Blair efefceabae Fixed (new style check: find empty catch blocks) 2010-06-14 23:45:46 -07:00
Reijo Tomperi c27e631aa2 Add testthreadexecutor.cpp 2010-06-14 23:18:09 +03:00
Robert Reif 98ae660260 Fixed (false positive: Variable 'test' is assigned a value that is never used) 2010-06-14 15:46:57 +02:00
Daniel Marjamäki cb7e9fbec1 Fixed (False Negative: Unitialized array) 2010-06-14 08:36:34 +02:00
Daniel Marjamäki e987d2e05b Memory leaks: more specific bailouts to reduce false negatives 2010-06-13 19:00:11 +02:00
Daniel Marjamäki 37ade20dad Added testcase for (false positive: memory leak) 2010-06-13 10:43:23 +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
Daniel Marjamäki 70bfa890a8 Fixed (Tokenizer add close braces to for loop at wrong place when if-else presents inside) 2010-06-13 08:00:46 +02:00
Robert Reif 18bb7488b9 Fixed (false negative: out of bounds in derived class) 2010-06-13 07:17:50 +02:00
Daniel Marjamäki 76221c0916 Fixed (false positive '(possible error) Memory leak' when 'a = b = new ...; delete a' (but not b)) 2010-06-12 13:37:44 +02:00
Daniel Marjamäki 3a4a151cc4 reverted 'added a todo testcase for ticket ' 2010-06-12 08:36:10 +02:00
Daniel Marjamäki f3fbdc96e1 Fixed (Tokenizer: template destructor is lost) 2010-06-12 08:32:05 +02:00
Martin Ettl 69ecc24bf5 added a few testcases for checking memory leaks in classes 2010-06-11 13:33:10 +02:00
Martin Ettl 81828742ac added a todo testcase for ticket 2010-06-11 13:23:10 +02:00
Martin Ettl be9c23cb1a added todo-testcase for ticket 2010-06-10 22:49:34 +02:00
Robert Reif 3d2c28a524 Fixed (false positive: Variable is not assigned a value) 2010-06-10 07:21:47 +02:00
Robert Reif 6b65b77acf Fixed ((error) ### Internal error in Cppcheck. Please report it.) 2010-06-10 07:18:55 +02:00
Daniel Marjamäki e64ce2e812 Fixed (false positive: uninitialized variable when using asm statement in macro) 2010-06-09 21:28:15 +02:00
Martin Ettl c9cd5ea250 added a todo testcase for ticket 1778 2010-06-09 01:21:52 +02:00
Robert Reif 00dcec47ac Variable usage: read variable when using syntax '..=*(p);' 2010-06-08 18:26:14 +02:00
Robert Reif f37a7ba934 Variable usage: Added TODO testcases for handling pointer alias. Ticket: 2010-06-06 20:37:48 +02:00
Martin Ettl 0d34416bce added TODO_TESTCASE for ticket 1734: Array index out of bounds 2010-06-06 16:20:50 +02:00
Martin Ettl 2b557cee45 added a TODO testcase for ticket 1724 2010-06-06 12:46:08 +02:00
Daniel Marjamäki 472bd9dabe Fixed (False negative: null pointer dereference in switch block) 2010-06-06 12:15:31 +02:00
Daniel Marjamäki e140ff6e84 Memory leaks: skipping function call inside allocation 2010-06-06 11:22:59 +02:00
Daniel Marjamäki a9196e8710 Memory leaks: Added allocation function 'g_strdup_printf' 2010-06-06 11:09:19 +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
Daniel Marjamäki 07e00d57d9 Fixed (segfault in ExecutionPath::bailOutVar (probably caused by fix)) 2010-06-05 09:45:35 +02:00
Leandro Lisboa Penz 4ac7da7d51 Fixed (memory leaks not found when calling a function that returns allocated memory through a parameter) 2010-06-04 20:58:50 -03:00
Daniel Marjamäki b11e23eb08 Fixed (False negative: uninitialized variable in switch block) 2010-06-03 20:02:58 +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
Robert Reif 4c4844b722 Fixed (Variable assigned value which is never used but is thrown) 2010-06-03 07:05:57 +02:00
Daniel Marjamäki cb43168d81 Fixed (segmentation fault of cppcheck) 2010-06-02 18:10:32 +02:00
Daniel Marjamäki 5789eb116d astyle formatting 2010-06-02 18:09:25 +02:00
Zachary Blair 33b4254d33 Fixed (string functions with command line arguments may overflow buffer) 2010-06-01 22:41:07 -07:00
Daniel Marjamäki a8f38e55dc Added unit test for ticket 2010-06-01 20:00:43 +02:00
Daniel Marjamäki 45821b3871 Fixed (False negative: memory leak (fgets in condition)) 2010-05-31 18:20:34 +02:00
Daniel Marjamäki 9b1ed1112b Memory leaks: Fixed bug in CheckMemoryLeak::functionReturnType 2010-05-30 20:30:08 +02:00
Daniel Marjamäki 08b6e6ee09 Fixed (False positive: Resource leak with while) 2010-05-30 13:15:15 +02:00
Daniel Marjamäki 83c62eca9c Tokenizer: simplify loops that continue while errno is EINTR 2010-05-30 12:49:39 +02:00
Daniel Marjamäki 37ae4692bb Uninitialized variables: fixed false negative when using uninitialized variable inside malloc call 2010-05-30 10:30:51 +02:00
Daniel Marjamäki 1ec49430e3 Uninitialized variables: better handling when uninitialized variables are used in function calls 2010-05-30 09:31:10 +02:00
Daniel Marjamäki ab41879246 ExecutionPath: Better handling of 'FOREACH (..) {}' 2010-05-30 09:00:18 +02:00
Daniel Marjamäki f41334e58a ExecutionPath: better handling of 'FOREACH(..){..}' 2010-05-30 08:26:44 +02:00
Daniel Marjamäki 406cbda563 Uninitialized variables: better handling of struct variables 2010-05-30 07:55:11 +02:00
Daniel Marjamäki 46b5e4e79a Fixed (Wrong reporting of leak with close() in a while loop condition) 2010-05-29 22:20:10 +02:00
Daniel Marjamäki 0c6352a826 Memory leaks: small fixes. add checking of 'g_fopen'. don't let 'fclose' calls be interpreted as 'callfunc' 2010-05-29 21:56:18 +02:00
Daniel Marjamäki 495dfde32c Fixed (Wrong reporting of leak with close() in a while loop condition) 2010-05-29 21:11:59 +02:00
Daniel Marjamäki 24703418bd Fixed (switch with fallthrough and 'return' confuses cppcheck) 2010-05-29 20:55:09 +02:00
Daniel Marjamäki d09e1df0d7 Fixed (Wrong precedence for shift operators when simplifying calculations?) 2010-05-29 20:27:08 +02:00
Daniel Marjamäki b702b8542d Memory leaks: enabled the leaks checking when members are not deallocated in the destructor. This checking was previously an --all check so there could be false positives. 2010-05-29 19:29:59 +02:00
Daniel Marjamäki 7601089bee astyle formatting 2010-05-29 11:19:56 +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
Zachary Blair fe1fa4022d Merge branch 'master' of github.com:danmar/cppcheck 2010-05-28 22:53:54 -07:00
Robert Reif 1a25183e8f Fixed (simplifyTypedef: support for more typedefs) 2010-05-29 07:52:06 +02:00
Zachary Blair 59086fa599 Fixed (Detect sprintf buffer overrun with struct members) 2010-05-28 22:51:28 -07:00
Robert Reif 3fb0260ef1 Fixed (remove Microsoft variants of inline) 2010-05-29 07:43:58 +02:00
Robert Reif 26a7d29760 Fixed (simplifyTypedef: support for more typedefs) 2010-05-28 06:55:54 +02:00
Daniel Marjamäki d3c20cac81 Fixed (False negative: dereferencing uninitialized pointer) 2010-05-27 19:00:52 +02:00
Robert Reif dc34a1b3ff Fixed (Wrong typedef name shown when struct declared with __attribute__) 2010-05-27 18:15:42 +02:00
Robert Reif 8881a0c361 Fixed (simplifyTypedef: support for more typedefs) 2010-05-27 07:00:33 +02:00
Robert Reif 176b41caa5 Fixed (char buffer that is only accessed with pointers is marker not assigned) 2010-05-26 19:22:35 +02:00
Daniel Marjamäki d23f63c805 astyle formatting 2010-05-26 19:21:34 +02:00
Daniel Marjamäki 88e9a4ade6 Fixed (false negative: null pointer dereference) 2010-05-26 19:16:42 +02:00
Zachary Blair 619cfbc56f Fixed (buffer overflow: not enough room for the null terminator) 2010-05-26 01:56:34 -07:00
Robert Reif 019e1f9dfe Fixed (simplifyTypedef: support for more typedefs) 2010-05-25 20:43:44 +02:00
Robert Reif 4306082fcf Fixed (False positive for const) 2010-05-25 06:55:49 +02:00
Daniel Marjamäki 5692e7a6f6 Fixed (false positive: Memory leak) 2010-05-24 19:28:27 +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
Daniel Marjamäki 78255fdfc5 Tokenizer: Removed the Tokenizer::simplifyNamespaces. Ticket: 2010-05-23 13:51:41 +02:00
Robert Reif b20cf06b66 Fixed (simplifyTypedef: support for more typedefs) 2010-05-23 10:46:39 +02:00
Robert Reif 048733a15e false positive: Variable is assigned a value that is never used 2010-05-23 10:41:05 +02:00
Daniel Marjamäki 75c9355e9a Added some multipass checking for the uninitialized variables. It is still experimental. You can activate it with the '--test-2-pass' switch. Some more refactorings are needed to make it truly usable, the main thing is to make it thread safe. 2010-05-21 19:35:18 +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
Daniel Marjamäki c31accc52a Fixed (Ticket is broken using latest from git) 2010-05-19 19:23:09 +02:00
Daniel Marjamäki f87eb774eb Fixed (False positive: array access after return cannot have default loop value) 2010-05-18 19:55:23 +02:00
Robert Reif 41c43c1790 Fixed (False positive: Function parameter 'x' is passed by value. It could be passed by reference instead.) 2010-05-18 18:20:11 +02:00
Zachary Blair 1539c0b3d2 Fixed (add a warning for potential memory leaks when using realloc) 2010-05-17 22:46:48 -07:00
Robert Reif 0d7474042a Fixed (segmentation fault of cppcheck) 2010-05-18 07:11:23 +02:00
Robert Reif 9dfbd3946a Fixed (Tokenizer::simplifyTypedef causes segfault for boost library) 2010-05-17 19:58:27 +02:00
Daniel Marjamäki f8442391af astyle formatting 2010-05-17 19:51:35 +02:00
Daniel Marjamäki 49c9413798 Visual Studio 2008: Updated test project 2010-05-17 19:36:52 +02:00
Daniel Marjamäki 268fe0175d asd 2010-05-17 19:18:05 +02:00
Monika Lukow 71e5c56bf9 Fixed (false negative: buffer access out of bounds) 2010-05-16 23:53:42 +02:00
Erik Lax 20289b1f5b Fixed (false positive: The function can be const) 2010-05-16 20:26:32 +02:00
Daniel Marjamäki 56d176e1ce Fixed (false positive: buffer access out of bounds when using extern variable declaration) 2010-05-16 20:21:22 +02:00
Daniel Marjamäki d0e122079f Refactoring: Removed possibleError messages from CheckMemoryLeaks 2010-05-16 19:55:16 +02:00
Erik Lax 19aaa32a99 Fixed (Tokenizer::simplifyKnownVariables and pointer assignments) 2010-05-16 19:38:44 +02:00
Daniel Marjamäki 01034cd48d Refactoring: Removed 'possible error' message about cin 2010-05-16 19:09:36 +02:00
Daniel Marjamäki 26fab24de4 Refactoring: Removed some inconclusive checking in CheckBufferOverrun 2010-05-16 15:30:39 +02:00
Daniel Marjamäki 6edb2e77b4 Refactoring: Removed Severity::possibleStyle 2010-05-16 14:43:42 +02:00
Daniel Marjam�ki 14b27f97fa Fixed (Allow giving used defines in command line) 2010-05-16 07:38:29 +02:00
Daniel Marjam�ki d7b117402c Code cleanup: Removed autodealloc handling 2010-05-16 07:15:31 +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
Erik Lax c0149d3cd1 Fixed (Bad iterators checks fails to detect bugs with indent levels) 2010-05-15 20:00:41 +02:00
Erik Lax 0510d9a2b0 Fixed (Bad iterators checks fail to detect invalidation of iterator for deletion by value) 2010-05-15 19:46:42 +02:00
Daniel Marjam�ki 70d20ac544 Fixed (false negative: memory leak in operator =) 2010-05-15 19:40:32 +02:00
Daniel Marjam�ki 972046c4bd Added test CheckOther::sizeofsizeof. Inspired by 2010-05-15 14:06:45 +02:00
Daniel Marjam�ki 85afa86da3 astyle formatting 2010-05-14 18:40:37 +02:00
Daniel Marjam�ki 8b1ffefd74 Fixed (Internal error) 2010-05-14 18:40:15 +02:00
Konrad Windszus c39f80d361 Ticket : Make sure error ids are unique 2010-05-13 22:14:29 +02:00
Robert Reif f8cceface5 Fixed (False positive: (style) Variable 'xxx' is assigned a value that is never used) 2010-05-13 13:59:41 +02:00
Martin Ettl 1382832bd0 mathlib:isInt() now handles calles of 'u' and 'l' correctly; testcases added 2010-05-12 23:49:09 +02:00
Robert Reif 963108d957 Fixed (simplifyTypedef: support for more typedefs) 2010-05-11 21:41:33 +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 5d01047ae4 Fixed ('If you see this, there is a bug': Token::Match('%var% ( %varid% [,)]', 0)) 2010-05-10 18:11:02 +02:00
Robert Reif a390f3c8f4 Better handling of function pointer typedef 2010-05-10 17:50:40 +02:00
Robert Reif ac7515cdcc Fixed (simplifyTypedef: add support for typedefs of functions) 2010-05-10 07:12:06 +02:00
Daniel Marjamäki d7118c4d36 Fixed (mismatch allocate and deallocate calls.) 2010-05-09 13:46:13 +02:00
Daniel Marjamäki 7c52c8683d Fixed (false positive: Data is allocated but not initialized, when using sprintf) 2010-05-09 07:48:52 +02:00
Robert Reif be35b72c7e Fixed (false positive: Variable is assigned a value that is never used, when using cast) 2010-05-09 07:15:40 +02:00
Robert Reif 87a54580a8 Added unit test for 2010-05-09 07:10:51 +02:00
Daniel Marjamäki 8971d697b2 Fixed (dangerous usage of erase not detected: for (; it != it2; ++it) ints.erase(it);) 2010-05-08 20:11:15 +02:00
Daniel Marjamäki 2901434773 Fixed (false negative: uninitialized pointer usage) 2010-05-08 19:23:46 +02:00
Daniel Marjamäki bd22a18dc1 Refactoring: Changed 'possible style' to 'style' 2010-05-08 09:49:01 +02:00
Daniel Marjamäki d19dd2c61d Fixed (False positive: Memory leak with: ( delete ( p ) , ( p ) = 0 );) 2010-05-07 18:37:50 +02:00
Zachary Blair 21b7eb61f5 Fixed : (new check: wrong usage of fflush()) Simplified and set severity to error 2010-05-06 23:08:10 -07:00
Daniel Marjamäki c8c5f95721 Fixed (Tokenizer::setVarId wrong handling of return statement) 2010-05-06 18:40:52 +02:00
Daniel Marjamäki 95f3533252 Robert Reif <reif@earthlink.net>
refactoring chained assignments
2010-05-05 19:34:03 +02:00
Daniel Marjamäki af4c4cef34 Fixed (False positive: array access after return cannot have default loop value) 2010-05-05 18:29:56 +02:00
Robert Reif 4c95264d29 Fixed (False positive: buffer is not assigned value (assigned through alias)) 2010-05-05 17:31:07 +02:00
Daniel Marjamäki 612be2557b Fixed (False positive: array access after return cannot have default loop value) 2010-05-04 20:02:47 +02:00
Robert Reif 7ce70777a4 Fixed (Variable usage (pointer is assigned but never used)) 2010-05-04 17:28:03 +02:00
Robert Reif eb276346c5 Fixed (False positive: unused variable value (pointer aliasing)) 2010-05-04 17:26:09 +02:00
Zachary Blair 707d27f3d8 Fixed (new check: wrong usage of fflush()) 2010-05-03 23:14:45 -07:00
Daniel Marjamäki 804b2a0952 Fixed (Tokenizer::simplifyKnownVariables: simplify after loop) 2010-05-02 14:41:21 +02:00
Daniel Marjamäki 0415560912 refactoring: changed the severity for strncatUsage from possibleError to style 2010-05-02 09:54:08 +02:00
Daniel Marjamäki 883d462553 refactoring: Use style severity instead of possible error for the 'The size argument is given as a char constant' 2010-05-02 09:16:45 +02:00
Daniel Marjamäki 136b84eaf5 STL: added testcase for 'if (str.find(%any%)) ..' 2010-05-01 21:56:39 +02:00
Daniel Marjamäki ae576be088 refactoring: enable the 'suspicious pointer subtraction' checking 2010-05-01 21:43:47 +02:00