Commit Graph

486 Commits

Author SHA1 Message Date
Daniel Marjamäki 3c0619cba5 astyle formatting 2014-02-05 18:49:34 +01:00
Pavel Roschin 4f38d7ae31 Library: add full GLib/GTK support 2014-02-05 19:52:24 +04:00
Pavel Roschin 0dd227419d CheckMemoryLeak: use library while checking whitelist functions 2014-02-05 12:16:50 +04:00
Daniel Marjamäki 8c40f4fee0 astyle formatting 2014-02-03 18:51:07 +01:00
Daniel Marjamäki ed4fa9f154 Merge pull request #231 from scriptum/rpg-add-glib-tests
Add GLib library, add GLib tests (some new bugs found)
2014-02-02 10:49:33 -08:00
Pavel Roschin 651ebcf17b Add GLib library, add GLib tests (some new bugs found) 2014-02-02 22:45:57 +04:00
Pavel Roschin e06e96e864 Added regression for #3236 (Failure to detect memory leak if pointer members are added) 2014-02-01 15:51:29 +04:00
Daniel Marjamäki 30b56437c1 Merge pull request #226 from scriptum/rpg-fix-function-parameter
CheckMemoryLeak: improve leak checking in function parameters
2014-01-28 20:32:56 -08:00
Pavel Roschin 2396073262 CheckMemoryLeak: improve leak checking in function parameters 2014-01-28 17:30:36 +04:00
Daniel Marjamäki 6e6de82323 CheckMemoryLeak: test alloc/dealloc configuration in posix.cfg 2014-01-27 16:51:18 +01:00
Daniel Marjamäki 2b8cf462c9 CheckMemoryLeak: Move posix-opendir/closedir to library 2014-01-26 17:02:36 +01:00
Simon Martin 6019f45249 Ticket #5201: Get rid of internal error when checking valid C input for memory leaks. 2014-01-03 23:27:56 +01:00
Zachary Blair 7a6386bc4b Fixed #4867 (Memory Leak: Return value of malloc) 2014-01-03 10:12:32 +01:00
PKEuS 4f0121ee2f Splitted simplification out of tokenize() 2013-12-30 17:45:28 +01:00
Daniel Marjamäki e13aa0dbc3 Fixed #5275 (FP mismatchAllocDealloc: user defined opendir()/closedir() on non-POSIX system) 2013-12-29 09:51:29 +01:00
Daniel Marjamäki 57ecdd693c Fixed #5149 (false positive: (error) Dereferencing 'memory' after it is deallocated / released) 2013-12-14 07:37:24 +01:00
Alexander Mai 6eab4abaf2 Fixed #5030 (Segmentation fault below CheckMemoryLeakStructMember::isMalloc()) 2013-09-21 18:10:29 +02:00
PKEuS a9a5dc0354 Updated to AStyle 2.03, require this version 2013-08-07 16:27:37 +02:00
Daniel Marjamäki 807204e580 Fixed #4237 (False positive: (error) Memory Leak: data (references and pointer aliases)) 2013-07-30 11:30:14 +02:00
Daniel Marjamäki 61e1dd5096 Environment: Refactoring and cleanup 2013-07-05 20:55:31 +02:00
Daniel Marjamäki 1a35241aa2 testrunner: removed redundant ';' 2013-06-30 19:44:12 +02:00
Daniel Marjamäki 582e0ee7e7 testrunner: Added REGISTER_TEST. Thanks lucasmrod. 2013-06-30 19:42:26 +02:00
Daniel Marjamäki 6b2bab535b CLI,LIB: Added --std setting for GTK 2013-06-29 12:55:24 +02:00
Daniel Marjamäki ae7363fe54 Fixed #4599 (False positive with fopen/fclose test) 2013-05-23 06:34:22 +02:00
Daniel Marjamäki cf75e2bb28 astyle formatting 2013-04-30 06:44:50 +02:00
Baris Demiray 548dd42aaf Fixed #933 (Leaks with struct members not detected) 2013-04-26 16:11:57 +02:00
XhmikosR 700512a53f use spaces in strings 2013-04-09 17:49:09 +02:00
Ettl Martin 3e8eddc69e cleanup testcases: moved testcases from #3888 into allocfunc13 which contains similar testcases already. 2013-04-03 10:12:36 +02:00
Ettl Martin 9f25b618dc #3888 added a testcase 2013-04-03 08:57:26 +02:00
Ettl Martin 1b9c1c03fa unittests: removed not needed '\n' at the end of testcases. 2013-03-20 15:36:16 +01:00
PKEuS 14feaa8d39 Refactorizations:
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00
PKEuS d78c06dc3f Replaced _settings->isEnabled("style") by _settings->isEnabled("warning") wherever warnings are issued 2013-03-03 02:41:59 -08:00
Daniel Marjamäki 2edf95a1b9 Fixed #4367 (false positive: Class '...' is unsafe, '...' can leak by wrong usage) 2013-02-24 08:14:25 +01:00
Frank Zingsheim 5144307642 Raise syntax error for if-condition without parentheses according to #2518 #4171 2013-02-05 21:13:57 +01:00
Daniel Marjamäki bd7e3cbac5 Fixed #4540 (memory leak not detected ('.' or '->' is used before Function)) 2013-01-31 17:00:50 +01:00
Frank Zingsheim 6dc9987ad0 Fixed #4517 (Testmemleak should not use Tokenizer on pseudo code) 2013-01-27 02:41:43 +01:00
Daniel Marjamäki f86e83d813 Memory leaks: Improved handling of allocation functions that contains ::. Ticket: #4494 2013-01-22 21:33:39 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Daniel Marjamäki a84d21f271 CheckMemoryLeaksInFunction: Fixed problems with catch and function calls. Ticket: #4405 2012-12-16 18:06:40 +01:00
Frank Zingsheim 327db15284 Fix #4045: memory leak not reported after usage of " + p[]" 2012-12-09 08:59:21 +01:00
PKEuS 4737966caf Unit test cleanup: Removed some empty lines and whitespaces before \n. 2012-12-06 10:19:22 -08:00
PKEuS 36aeb74b5a Fixed string literals in several unit tests (one test failing - changed it to TODO) 2012-11-29 21:07:52 +01:00
Daniel Marjamäki 38213f1f2f Fixed #4237 (False positive: (error) Memory Leak: data (assign reference variable value to a shadow variable in inner scope)) 2012-10-27 16:36:14 +02:00
Daniel Marjamäki 863441afe8 Fixed #4236 (False positive: pointer free()d twice - neglecting call to other function) 2012-10-25 19:41:18 +02:00
PKEuS 22a8e3f4e6 Replaced Tokenizer::getFunctionTokenByName() by SymbolDatabase::findFunctionByName(), which handles scopes slightly better. 2012-09-11 18:03:47 +02:00
Daniel Marjamäki 54f1771938 Fixed #4082 (Maybe false positive: memleak) 2012-09-10 17:27:41 +02:00
Daniel Marjamäki 2a9eaebcaa replaced tabs with spaces 2012-09-05 20:50:25 +02:00
PKEuS 1fbaae948c Added regression test cases for #404. 2012-08-26 11:39:17 +02:00
PKEuS 35d94c26d5 Changed creation of SymbolDatabase. Database always created after Tokenizer::tokenize() and Tokenizer::simplifyTokenList() instead of on-demand creation by Tokenizer::getSymbolDatabase.
-> With Token::scope() it is possible to access the symboldatabase without having to call getSymbolDatabase(). The change increases safety because it is guaranteed that the database is available in all checks, even if the specific check doesn't call getSymbolDatabase
- Tokenizer::_symbolDatabase does no longer have to be mutable -> Increased const correctness

The change above required two additional changes:
- A bug causing a debug message was fixed in the symboldatabase that became visible in the test suite by the change above.
- Simplify expressions like "struct struct Foo" which might be result of typedef instanciation.
2012-08-12 03:01:24 -07:00
PKEuS 45bad7d1b2 Refactorized tokenizer:
- Don't run setVarId() twice, keep old varId's while/after simplifyTokenList
-> Modified two test cases in testmemleak.cpp. I consider this to be safe. Feel free to investigate this.
- Fixed two nullpointer issues shown by cppcheck

Ran Astyle on teststl.cpp
2012-08-10 09:31:22 -07:00