Daniel Marjamäki
d5d96d2535
Merge branch 'master' of git@github.com:danmar/cppcheck
2009-06-18 23:10:16 +02:00
Daniel Marjamäki
12f3ac5a2f
Preprocessor: better handling of "..." and "__VA_ARGS__" in macros
2009-06-18 23:09:11 +02:00
Reijo Tomperi
e8d1905e6d
Fix ticket #418 (delete a,b; not tokenized correctly)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/418
2009-06-19 00:00:16 +03:00
Reijo Tomperi
b7171c3cd2
Fix ticket #413 (false positive: C-style pointer casting for pure virtual function)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/413
2009-06-18 23:26:21 +03:00
Slava Semushin
fafc261611
Fixed ticket #278 (variable id: references are not handled correctly)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/278
2009-06-18 23:30:04 +07:00
Daniel Marjamäki
5d0d21d668
Fixed a false positive (memory leak)
...
This false positive was first discovered in the VLC sourcecode. The TestMemoryLeakInFunction::simple11 test case is a simplified test code of that code.
2009-06-17 21:42:49 +02:00
Reijo Tomperi
f8b3a57682
Fix ticket #309 (false positive::is not assigned a value in 'A::operator=')
...
http://sourceforge.net/apps/trac/cppcheck/ticket/309
2009-06-17 00:58:16 +03:00
Daniel Marjamäki
b7c9a4ed8c
Created a new class for detecting leaks (forgetting to free struct members)
2009-06-16 22:01:04 +02:00
Daniel Marjamäki
ed98f1b367
Fixed #131 (Regression: leak reported by 1.27 is not reported by 1.29)
...
The leak will be reported as a definite bug again. Not just a possible bug.
cppcheck don't know if the execution path is possible, but it knows that if the execution path is taken the memory leak will be certain.
2009-06-16 19:05:05 +02:00
Daniel Marjamäki
a81b6487bf
Improved the "CheckMemoryLeak::functionReturnType"
2009-06-15 21:13:39 +02:00
Reijo Tomperi
0c059af3cb
getXMLFooter() and getXMLHeader() functions added and taken into use
2009-06-15 21:36:39 +03:00
Daniel Marjamäki
433ff048a4
Fixed #264 (Memory Leak: alloc by assigning to a return value)
...
The fix was inspired by the previous patch submitted by hoangtuansu
2009-06-15 17:44:59 +02:00
Reijo Tomperi
7c4423889c
Fixed ticket #405 (#ifdef A and #if defined A should be handled as same configuration)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/405
2009-06-14 23:37:18 +03:00
Slava Semushin
8c327f82b3
Fixed ticket #346 (adding a "const" token prevents detection of memory leak)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/346
2009-06-15 00:32:34 +07:00
Daniel Marjamäki
af7c63155e
Fixed #387 (Templates: template functions that return a pointer are not simplified correctly)
...
* Fixed so that the tokenizer handle variable declarations better when the variable is assigned the return value of a template function
* Fixed so that the simplifyTemplates detect that a template function is used when its return value is taken
2009-06-14 14:57:47 +02:00
Daniel Marjamäki
c56c913635
Merge branch 'master' of git@github.com:danmar/cppcheck
2009-06-14 11:30:22 +02:00
Daniel Marjamäki
be52e573f3
Fixed ticket #387 (Templates: template functions that return a pointer are not simplified correctly)
2009-06-14 11:28:25 +02:00
Slava Semushin
4286fdbabb
Token: introduce str(const std::string &) method.
...
Get rid of useless std::string.c_str() calls.
No functional change.
2009-06-14 13:55:23 +07:00
Slava Semushin
bc32d04efa
Replace tok->previous()->previous() call to tok->tokAt(-2).
...
Done by command:
git grep -l 'previous()->previous()' | xargs sed -i 's|previous()->previous()|tokAt(-2)|'
No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin
57f1a6d2b7
Replace tok->previous()->previous()->previous() call to tok->tokAt(-3).
...
Done by command:
git grep -l 'previous()->previous()->previous()' |
xargs sed -i 's|previous()->previous()->previous()|tokAt(-3)|'
No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin
4245047674
Replace tok->next()->next() call to tok->tokAt(2).
...
Done by command:
git grep -l 'next()->next()' | xargs sed -i 's|next()->next()|tokAt(2)|'
No functional change.
2009-06-14 13:33:45 +07:00
Slava Semushin
ab0a1973e8
Replace tok->next()->next()->next() call to tok->tokAt(3).
...
Done by command:
git grep -l 'next()->next()->next(),' | xargs sed -i 's|next()->next()->next()|tokAt(3)|'
No functional change.
2009-06-14 13:33:44 +07:00
Slava Semushin
b3841dda96
Replace tok->next()->next()->next()->next() call to tok->tokAt(4).
...
Done by command:
git grep -l 'next()->next()->next()->next(),' | xargs sed -i 's|next()->next()->next()->next()|tokAt(4)|'
No functional change.
2009-06-14 13:33:44 +07:00
Daniel Marjamäki
2307395d6e
Fixed ticket #373 (False unused functions)
...
Skip template functions when checking for unused functions
2009-06-14 07:58:36 +02:00
Slava Semushin
084b3c002f
Fixed ticket #403 (false positive::Array index out of range)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/403
2009-06-14 11:21:20 +07:00
Kimmo Varis
3e045dcf37
Fix the copyright text in Windows executable.
2009-06-14 00:24:35 +03:00
Reijo Tomperi
a6d2dceeb3
Fixed ticket #398 (valgrind shows error when running testrunner)
...
http://172.29.29.21/apps/trac/cppcheck/ticket/398
2009-06-13 00:17:06 +03:00
Reijo Tomperi
9ea80b4d74
Fix ticket #397 (xml output doesn't encode " and & -characters as it should)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/397
2009-06-12 22:02:01 +03:00
Daniel Marjamäki
777790ebc7
Fixed ticket #367 (Deallocating a deallocated pointer false positive when va_list used)
...
The overall matching of functions when calls are made were improved.
2009-06-12 17:31:29 +02:00
Reijo Tomperi
6362574c1a
astyle fix
2009-06-12 18:24:43 +03:00
Daniel Marjamäki
35b6b2588e
Fixed ticket #374 (False positive: The scope of variable can be limited)
...
A few refactorings and fixes were made
2009-06-12 16:17:51 +02:00
Slava Semushin
cba0d9e130
Fixed ticket #392 (false positive and wrong allocation and deallocation not detected)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/392
2009-06-12 21:14:01 +07:00
Slava Semushin
56a0660972
Tokenizer::createLinks(): correct comment.
...
No code change.
2009-06-12 20:49:49 +07:00
Daniel Marjamäki
169cfc1324
doc: minor update. The [BR] is not working as I thought
2009-06-12 15:30:29 +02:00
Daniel Marjamäki
9b2b14a608
doc: generating wiki documentation
2009-06-12 15:20:08 +02:00
Slava Semushin
7bee0cd2df
Fixed ticket #390 (wrong allocation and deallocation not detected)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/390
2009-06-12 20:04:58 +07:00
Daniel Marjamäki
0c01132698
added a classInfo function for each check class
2009-06-12 12:19:37 +02:00
Reijo Tomperi
092bd79ec4
Fix ticket #386 (False positive (memory leak) with comma)
...
http://apps.sourceforge.net/trac/cppcheck/ticket/386
2009-06-11 00:12:26 +03:00
Daniel Marjamäki
d8f95f68c3
Fixed ticket #377 (False positive with "char a[]")
...
Updated the tokenizer so "char a[]" is tokenized into "char *a"
2009-06-10 19:36:00 +02:00
Reijo Tomperi
db7b8fb3fd
Partial fix for ticket #380 (Error reporting on unused functions)
...
Returning hard coded line number 1 and assumed that severity should be "style"
https://apps.sourceforge.net/trac/cppcheck/ticket/380
2009-06-09 23:45:31 +03:00
Slava Semushin
879174b06c
src/checkunusedfunctions.h: assign default values in initializer list.
...
No functional change.
2009-06-10 03:12:57 +07:00
Slava Semushin
c000fd581a
Don't print message about missing source files when --errorlist used.
...
Also exit with zero status in this case.
Fix for 5193a36a6a
commit.
2009-06-10 02:05:21 +07:00
Daniel Marjamäki
a71d260308
Refactoring: Moved CheckOther::returnPointerToLocalVariable to CheckAutoVariables
2009-06-09 19:45:58 +02:00
Daniel Marjamäki
a3bf635249
Doxygen: Added a few simple doxygen comments for the leaks checking
2009-06-08 20:54:49 +02:00
Daniel Marjamäki
2c07c22d9e
Refactoring: Split up the CheckMemoryLeak into CheckMemoryLeakInFunction and CheckMemoryLeakInClass
2009-06-08 20:20:43 +02:00
Daniel Marjamäki
15dbf9c085
Refactoring: Renaming the CheckMemoryLeakClass to CheckMemoryLeak. Deleted testmemleakmp
2009-06-08 18:51:17 +02:00
Daniel Marjamäki
d7fa3e6dda
Refactoring: Renamed CheckFunctionUsage to CheckUnusedFunctions
2009-06-07 22:12:20 +02:00
Daniel Marjamäki
6356db82a9
Added headers to the "--errorlist" output
2009-06-07 18:53:47 +02:00
Daniel Marjamäki
548f45899f
Updated version to 1.33
2009-06-07 12:57:39 +02:00
Reijo Tomperi
9bac4aca75
Fix ticket #371 (Resource leak when exit() and if() uses together)
...
http://apps.sourceforge.net/trac/cppcheck/ticket/371
2009-06-07 09:55:20 +03:00