Commit Graph

96 Commits

Author SHA1 Message Date
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
Kimmo Varis ad0394939a Refactor ErrorMessage constructor to take Severity::SeverityType.
This removes lots of unneeded casting as everybody now uses the
Severity::SeverityType.
2010-07-14 23:11:32 +03:00
Kimmo Varis 05adb285c5 Rename Severity::stringify() to Severity::toString(). 2010-07-14 17:40:18 +03:00
Kimmo Varis 3716b3f9d8 Rename Severity::e to Severity::SeverityType. 2010-07-14 17:30:03 +03: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
Daniel Marjamäki dc2a0a6468 Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter)) 2010-07-06 21:36:50 +02:00
Daniel Marjamäki ae3557fa92 Fixed #1820 (False positive: memory leak (auto deallocated class)) 2010-07-05 14:01:25 +02:00
Daniel Marjamäki 3205775eb9 Fixed #1790 (mismatching allocation/deallocation false positive) 2010-06-30 09:21:15 +02:00
Daniel Marjamäki d22da6088c Fixed #1800 (false positive: memory leak when ptr used as map key) 2010-06-21 18:43:28 +02:00
Leandro Lisboa Penz 58a872e6a0 Fixed #1789 (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 #853 (False positive: memory leak for member variable with unknown function) 2010-06-16 19:28:47 +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 76221c0916 Fixed #1510 (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 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 1de6e94947 Code coverage: Removed unused code 2010-06-05 11:25:47 +02:00
Leandro Lisboa Penz 4ac7da7d51 Fixed #73 (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 45821b3871 Fixed #1719 (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 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 #1716 (Wrong reporting of leak with close() in a while loop condition) 2010-05-29 21:11:59 +02:00
Daniel Marjamäki 24703418bd Fixed #1715 (switch with fallthrough and 'return' confuses cppcheck) 2010-05-29 20:55:09 +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 5692e7a6f6 Fixed #1707 (false positive: Memory leak) 2010-05-24 19:28:27 +02:00
Daniel Marjamäki 1792395654 astyle formatting 2010-05-18 20:08:27 +02:00
Zachary Blair 1539c0b3d2 Fixed #1649 (add a warning for potential memory leaks when using realloc) 2010-05-17 22:46:48 -07:00
Daniel Marjamäki d0e122079f Refactoring: Removed possibleError messages from CheckMemoryLeaks 2010-05-16 19:55:16 +02:00
Daniel Marjamki d7b117402c Code cleanup: Removed autodealloc handling 2010-05-16 07:15:31 +02:00
Daniel Marjamki 70d20ac544 Fixed #1681 (false negative: memory leak in operator =) 2010-05-15 19:40:32 +02:00
Daniel Marjamäki 5d01047ae4 Fixed #1665 ('If you see this, there is a bug': Token::Match('%var% ( %varid% [,)]', 0)) 2010-05-10 18:11:02 +02:00
Daniel Marjamäki d7118c4d36 Fixed #1648 (mismatch allocate and deallocate calls.) 2010-05-09 13:46:13 +02:00
Daniel Marjamäki d3b5c30c6c Fixed #1628 (false negative: memory leak when using redundant braces) 2010-04-27 20:43:31 +02:00
Daniel Marjamäki eb82a89758 ExecutionPath: Better handling of if 2010-04-25 11:55:57 +02:00
Daniel Marjamäki e068979d62 Fixed #1440 (false negative: memory leak (function parameters)) 2010-04-24 22:24:03 +02:00
Daniel Marjamäki 5e5b8d3861 Fixed #1146 (improve check: memory leak not detected (allocation in subfunction)) 2010-04-24 20:40:57 +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
Reijo Tomperi fcf532ccaf Fix some -Wshadow compile warnings 2010-04-06 23:17:23 +03:00
Daniel Marjamäki cd2f8f6838 Merge branch 'master' of git://github.com/czw/cppcheck 2010-04-06 22:12:11 +02:00
Reijo Tomperi 5aa88ee5a2 Fix vs warnings. Apply patch from kidkat. 2010-04-06 21:35:21 +03:00
Jens Bäckman 9ae714661b Fix a rare crash with oddly formatted source files 2010-04-06 14:23:17 +02:00
Daniel Marjamäki b62ac149b5 Cleanup: Removed unused code from CheckMemoryLeak 2010-04-05 18:37:46 +02:00
Daniel Marjamäki abceff497b Refactoring: some refactoring of ExecutionPath. The foundError was removed. No automatic bailout of all checks are made when errors are found. 2010-04-04 11:24:52 +02:00
Daniel Marjamäki a8f566bfcd Cleanup: Removed redundant simplification in checkmemoryleak.cpp 2010-04-03 20:47:38 +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
Daniel Marjamäki 3d90559035 Fixed #1386 and #1387 (False positives given by CheckMemoryLeakInFunction when temporary and member variable don't have the same allocation and deallocation) 2010-03-20 07:50:52 +01:00
Daniel Marjamäki 54c5d53eac Fixed #1428 (False positive: (possible error) Memory leak when memory deleted in destructor) 2010-03-19 16:57:23 +01:00
Daniel Marjamäki 30d3418b11 doxygen: added more comments for CheckNullPointer and CheckUninitVar 2010-03-13 21:42:59 +01:00
Daniel Marjamäki 65ae37de2f Fixed #1460 (false positive: memory leak when using throw no_memory) 2010-03-13 17:11:48 +01:00