danmar
4f6b79b761
Fixed #625 (cppcheck dumps core on valid code)
2009-08-28 12:57:29 +02:00
danmar
bb2bda0be4
Fixed #622 (Tokenizer: Calculations are wrong)
2009-08-28 12:13:46 +02:00
danmar
465c450247
Borland C++: Fixed problem in FileLister
2009-08-28 11:00:42 +02:00
danmar
3b2744e04a
borland c++: fixed compiler errors
2009-08-28 10:22:40 +02:00
Daniel Marjamäki
5d2c409e46
Fixed #623 (False positive: possible null pointer dereference when using the ?: operator)
2009-08-28 08:48:37 +02:00
Slava Semushin
dd64637ff1
Fixed #616 (Tokenizer: simplifyTemplates() should link() all inserted brackets)
...
This also fixed #619 .
http://sourceforge.net/apps/trac/cppcheck/ticket/616
http://sourceforge.net/apps/trac/cppcheck/ticket/619
2009-08-27 23:45:59 +07:00
Slava Semushin
9e32a0a595
Revert "Fixed #616 (cppcheck crashes with Eigen/src/Cholesky/CholeskyInstantiations.cpp)"
...
This reverts commit 89f9645174
.
This change not fully and properly fixes a problem but just work
arround it. The root of problem is because
Tokenizer::simplifyTemplates() inserts new tokens with brackets which
not link()-ed.
2009-08-27 23:40:58 +07:00
Reijo Tomperi
929dbe92e4
Fix the last test case from ticket #613 (array members variables are not checked in constructor)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/613
2009-08-26 23:33:23 +03:00
Daniel Marjamäki
ff9ed1d7aa
Preprocessor: better handling of pragma asm and pragma endasm
2009-08-26 21:54:43 +02:00
Slava Semushin
7c86a10a9d
Fixed #617 (False positive "buffer overrun" when sprintf() doesn't have optional parameters)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/617
2009-08-27 00:21:32 +07:00
Daniel Marjamäki
f94aab35e7
Fixed #498 (Tokenizer: simplify 'goto')
2009-08-26 18:46:56 +02:00
Slava Semushin
89f9645174
Fixed #616 (cppcheck crashes with Eigen/src/Cholesky/CholeskyInstantiations.cpp)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/616
2009-08-26 23:44:01 +07:00
Slava Semushin
8dcb846627
Fixed #614 (If you see this, there is a bug ###### Token::Match() - varid was 0)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/614
2009-08-26 02:44:19 +07:00
Slava Semushin
311fb1a1f8
src/checkmemoryleak.{h,cpp}: minor improvements.
...
Corrections for commit 0d6b6e840d
No functional change.
2009-08-26 02:32:10 +07:00
Slava Semushin
ff3d1db480
Replace "const unsigned int" to "unsigned int" in methods parameters.
...
No functional change.
2009-08-26 02:26:12 +07:00
Slava Semushin
bb15efb928
src/checkclass.cpp: propagate Token::strAt().
...
No functional change.
2009-08-26 02:04:48 +07:00
Slava Semushin
9a2a12c333
Tokenizer(simplifyGoto): create links for inserted braces.
2009-08-26 01:58:50 +07:00
Daniel Marjamäki
9569f758f8
fixed segmentation fault
2009-08-25 17:54:04 +02:00
Daniel Marjamäki
c25e1963b1
Fixed #498 (Tokenizer: simplify 'goto')
2009-08-24 23:10:12 +02:00
Reijo Tomperi
c581753040
Fix ticket #613 (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
Daniel Marjamäki
522f4c18c8
astyle formatting
2009-08-23 17:17:57 +02:00
Daniel Marjamäki
9da2ecf4f4
Refactoring the unit testing. Wrote special tests for CheckMemoryLeakInFunction::findleak
2009-08-23 15:48:25 +02:00
Daniel Marjamäki
99938353b4
Merge commit 'd0k/master'
2009-08-23 12:45:49 +02:00
Slava Semushin
8cafaf2960
Fixed #603 (Tokenizer: Incorrect simplification of < >)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/603
2009-08-23 13:26:16 +07:00
Slava Semushin
e6120a5725
Fixed #581 (Wrong usage of div-function)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/581
2009-08-23 10:37:09 +07:00
Slava Semushin
703fd45f78
Tokenize: minimize createLinks() calls.
...
No functional change.
2009-08-23 10:36:34 +07:00
Benjamin Kramer
18696679e3
Token: inline some functions
2009-08-22 22:36:12 +02:00
Benjamin Kramer
0d6b6e840d
Improve performance by using bsearch(3) instead of a std::set
...
The function name list is already in memory so we can avoid copying it into a std::set
if we sort the list alphabetically. This way no binary search tree has to be allocated.
Before (best of 5 runs):
./testrunner > /dev/null 0,21s user 0,00s system 95% cpu 0,221 total
After (best of 5 runs):
./testrunner > /dev/null 0,20s user 0,00s system 95% cpu 0,210 total
2009-08-22 20:24:26 +02:00
Slava Semushin
7ac6162947
Token::createMutualLinks(): introduce and use.
...
No functional change.
2009-08-22 21:22:50 +07:00
Slava Semushin
368bacff9a
Tokenizer: propagate Token::eraseTokens().
...
No functional change.
2009-08-22 21:04:58 +07:00
Slava Semushin
282f9104e7
Tokenizer::simplifyTokenList(): call link() for just inserted tokens.
2009-08-22 20:41:26 +07:00
Slava Semushin
6a5afd6243
Refactoring: Use the MathLib::toString() to stringify a number.
...
No functional change.
2009-08-22 18:47:14 +07:00
Daniel Marjamäki
724d6bf53a
Fixed #507 (Preprocessor: Incorrect expanding of inner macros)
2009-08-22 13:03:52 +02:00
Slava Semushin
acc38a8bbf
Fixed #592 (Tokenizer: improve the tokenization of do .. while)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/592
2009-08-22 17:49:42 +07:00
Daniel Marjamäki
94c49bc34e
Fixed #608 (Tokenizer: simplifyKnownVariables doesn't handle 'while (--i)' correctly)
2009-08-22 10:23:55 +02:00
Slava Semushin
2664bcf650
Tokenizer::simplifyIfAddBraces: use Token::link() instead of loop.
...
No functional change.
2009-08-22 14:54:28 +07:00
Slava Semushin
cbeb45566b
Fixed #609 (Tokenizer: don't add {} after do-while();)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/609
2009-08-22 14:49:45 +07:00
Daniel Marjamäki
7b3fdec5cf
Refactoring: Use the MathLib::toString to stringify a number
2009-08-21 14:50:13 +02:00
Daniel Marjamäki
439ff8b144
Fixed #599 (False positive: null pointer dereference)
2009-08-21 12:42:40 +02:00
Daniel Marjamäki
88251f5ac0
astyle formatting
2009-08-21 11:11:21 +02:00
Reijo Tomperi
9d1907be66
Fix ticket #600 (Tokenizer: if(!(fclose(fd) == 0)) is simplified incorrectly)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/600
2009-08-20 22:37:05 +03:00
Reijo Tomperi
7d44ce7736
Fix ticket #598 (Preprocessor: Multiline comments add line change to wrong location)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/598
2009-08-20 00:27:47 +03:00
Daniel Marjamäki
8b46172bcf
Memory leaks: Use varid instead of varname
2009-08-19 19:42:07 +02:00
Daniel Marjamäki
85682ed429
Fixed #591 (False positive: Deallocating a deallocated pointer)
2009-08-18 20:49:08 +02:00
Daniel Marjamäki
2cdb0abb82
Refactoring: Use the Token::link instead of loop
2009-08-17 22:23:37 +02:00
Reijo Tomperi
40fc605e2b
Fix ticket #597 (Compile error with Visual C++)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/597
2009-08-17 22:24:17 +03:00
Kimmo Varis
ec40b4c628
Don't force debug builds in qmake project files.
...
When creating makefiles with qmake one needs to give the target in command
line. E.g.
$ qmake -config debug
or
$ qmake -config release
For Visual studio projects both targets are generated by just running the
qmake command without switches.
2009-08-17 18:12:53 +03:00
Kimmo Varis
d16d19e580
Add new header file to qmake project files.
2009-08-17 18:05:10 +03:00
Reijo Tomperi
8b4b618fc4
Use _str.length() == 1, instead of _str[1] == 0
2009-08-16 23:50:00 +03:00
Reijo Tomperi
36a8e8afba
Fix ticket #543 (Possible buffer overrun in Token::Match())
...
http://sourceforge.net/apps/trac/cppcheck/ticket/543
Get rid of string copying in Token::Match(), also improves speed a little.
8.0s -> 7.7s
2009-08-16 23:28:17 +03:00