Commit Graph

134 Commits

Author SHA1 Message Date
Daniel Marjamäki f4943b8b9c changed error message when there an internal error in Cppcheck is found 2009-11-29 16:13:14 +01:00
Daniel Marjamäki e7d7507c65 Fixed #1020 (lib/tokenize.cpp:4615: bool Tokenizer::validate() const: Assertion 0 failed) 2009-11-29 12:14:42 +01:00
Reijo Tomperi 57aac9270a validator bugs are now printed using the errorlogger 2009-11-28 23:08:43 +02:00
Daniel Marjamäki f927375b7e DJGPP: fix runtime errors because list is destroyed before objects 2009-11-28 19:43:13 +01:00
Reijo Tomperi ee7b09fb8d Use sizeOfType() instead of sizeof(void*) 2009-11-28 18:24:16 +02:00
Martin Ettl 03e7914c98 partial fix of ticket #997; added check for write() two testcases 2009-11-28 13:41:24 +01:00
Daniel Marjamäki b0470d649a mode change from 755 to 644 2009-11-28 12:56:34 +01:00
Daniel Marjamäki f75c9619d1 Fixed #1021 (Out-of-bounds access false positive) 2009-11-28 12:51:23 +01:00
Daniel Marjamäki 6e175053c1 minor fixes 2009-11-28 11:47:44 +01:00
Daniel Marjamäki 3db49aee71 fixed buffer overrun and removed redundant function Token::str 2009-11-28 09:48:43 +01:00
Daniel Marjamäki 5ab8967632 Borland C++: Fixed compiler error 2009-11-28 08:55:51 +01:00
Reijo Tomperi 0bdf63d864 Token debug function printOut() can now print out filename instead of index 2009-11-28 00:04:04 +02:00
Reijo Tomperi 2c51542cf1 Fix #1018 (strcat(strcat()) causes assertion in Tokenizer::validate)
Test case provided by povaddict
http://sourceforge.net/apps/trac/cppcheck/ticket/1018
2009-11-27 23:21:13 +02:00
Daniel Marjamäki c94ecfe1a3 Fixed #1015 (SIGABRT: Tokenizer::validate for openttd/src/ai/ai_config.cpp) 2009-11-27 17:32:53 +01:00
Daniel Marjamäki 7616246597 Fixed #1014 (Preprocessor: Invalid preprocessing of '#define some_delete(x) delete x;') 2009-11-26 17:32:18 +01:00
Reijo Tomperi 12a87fa3a4 Fix #1007 (False positive array index out of bounds concerning a switch statement in a for loop)
Bailout if switch is found in for loop.
http://sourceforge.net/apps/trac/cppcheck/ticket/1007
2009-11-25 22:40:51 +02:00
Daniel Marjamäki 128b2b8c59 Fixed #989 (CppCheck crashes on Win XP when scanning large directories/subdirectories) 2009-11-23 18:59:50 +01:00
Reijo Tomperi 2ff6ac9768 Fix #1003 (Compiler warning: is there a reason for Tokenizer::getErrorMessages to be virtual?)
Destructor is now virtual.
http://sourceforge.net/apps/trac/cppcheck/ticket/1003
2009-11-22 16:06:33 +02:00
Daniel Marjamäki 9b397afeca Temporary fix for #994 (cppcheck cannot check my sources with segfaulting) 2009-11-22 13:38:45 +01:00
Daniel Marjamäki 7f6f41fd53 Fixed #993 (Latest Git drop aborts at 63% of wine tree) 2009-11-22 09:06:39 +01:00
Slava Semushin 334eaa35ef lib/preprocessor.cpp: clean up code.
Improvements for: 092f64b77a

No functional change.
2009-11-22 01:14:29 +06:00
Daniel Marjamäki 092f64b77a Fixed #982 (Preprocessor: detects and remove conditions which always true) 2009-11-21 19:53:07 +01:00
Slava Semushin 38a6c41730 Fixed #988 (Tokenizer::simplifyDoWhileAddBraces(): don't add braces after "do" when it not a loop)
FIXME: test cases needed.

http://sourceforge.net/apps/trac/cppcheck/ticket/988
2009-11-21 20:46:17 +06:00
Reijo Tomperi 9bdf4502ed Fix #995 (false positive: buffer access out of bounds when using fgets)
http://sourceforge.net/apps/trac/cppcheck/ticket/995
2009-11-21 15:45:52 +02:00
Reijo Tomperi 6417704577 Fix #985 (Detect buffer overrun with read())
http://sourceforge.net/apps/trac/cppcheck/ticket/985
2009-11-20 23:47:06 +02:00
Daniel Marjamäki 531d0fa685 Fixed #965 (Division by zero false positive with nested macros) 2009-11-20 20:42:28 +01:00
Slava Semushin 41b2a52915 Fixed #990 (Tokenizer::simplifyIfAddBraces() handle case where statement after if doesn't end by semicolon)
http://sourceforge.net/apps/trac/cppcheck/ticket/990
2009-11-21 01:40:46 +06:00
Daniel Marjamäki 91f7c15c24 Fixed #960 (Tokenizer::validate() assertion failure with mismatched brackets) 2009-11-20 20:10:42 +01:00
Daniel Marjamäki 7890589693 Fixed #912 (### Unlogged error at Tokenizer::syntaxError: Invalid number of character (()) 2009-11-20 19:18:57 +01:00
Slava Semushin 5369965e55 Fixed #983 (Tokenizer::simplifyTypedef() incorrectly substitute type inside namespace)
http://sourceforge.net/apps/trac/cppcheck/ticket/983
2009-11-20 00:02:16 +06:00
Reijo Tomperi 7ddc4f4e02 Fix #971 (Preprocessor: Handle partial macro in macro)
http://sourceforge.net/apps/trac/cppcheck/ticket/971
2009-11-19 00:34:00 +02:00
Daniel Marjamäki 42ffea4f16 Fixed #968 (False positive when TEMP_FAILURE_RETRY used) 2009-11-18 17:17:37 +01:00
Slava Semushin 42c5025000 Fixed #970 (Tokenizer: Incorrect comparison order simplification)
Revert changes from 11cb7b4710 commit
for lib/tokenize.cpp (fixed it by another way).

Teach unsignedint() to expand "unsigned" in casts.

http://sourceforge.net/apps/trac/cppcheck/ticket/970
2009-11-18 00:05:18 +06:00
Daniel Marjamäki d866c174cf Fixed 2009-11-15 20:26:07 +01:00
Daniel Marjamäki 469a8e4032 Fixed #925 (uninitialized deletion not detected) 2009-11-15 20:01:57 +01:00
Daniel Marjamäki 95c898f37b Fixed #891 (false positive: division by zero) 2009-11-15 19:07:36 +01:00
Reijo Tomperi 54c6d8ab2c Minor fix to previous commit 2009-11-15 17:49:47 +02:00
Reijo Tomperi 9275b49688 Fix #964 (Integer division by zero exception)
http://sourceforge.net/apps/trac/cppcheck/ticket/964
2009-11-15 17:44:30 +02:00
Daniel Marjamäki caa9707e33 help screen updates for the --enable command (#883) 2009-11-15 15:36:57 +01:00
Daniel Marjamäki 2b1b7f78f5 Fixed #883 (Add new command line argument --enable) 2009-11-15 15:24:33 +01:00
Slava Semushin 6669a50634 Fixed #842 (out of bounds: when buffer is allocated with malloc)
http://sourceforge.net/apps/trac/cppcheck/ticket/842
2009-11-15 18:38:57 +06:00
Slava Semushin 3911dd79cb Fixed #900 (Improve out-of-bounds check to detect error with "new char(x)")
http://sourceforge.net/apps/trac/cppcheck/ticket/900
2009-11-15 18:04:17 +06:00
Daniel Marjamäki 822f64ec9a Fixed #953 (false positive: 'uninitialized variable' with function pointer) 2009-11-15 12:42:04 +01:00
Daniel Marjamäki b5cbc509f3 Fixed #483 (False positive: found leak when foreach for lists used) 2009-11-15 10:30:00 +01:00
Daniel Marjamäki 14fd0154d2 memory leaks: simple code cleanup 2009-11-15 09:53:38 +01:00
Daniel Marjamäki 5dd7b054f9 Fixed #915 (false positive: memory leak for struct member (allocated in condition) 2009-11-15 09:28:08 +01:00
Daniel Marjamäki ebf907cbc0 Fixed #936 (false positive: uninitialized variable '.. else return; .. ') 2009-11-14 20:37:54 +01:00
Daniel Marjamäki 99c6d11c70 removed command line flag --exception-safety from the help page 2009-11-14 14:02:54 +01:00
Slava Semushin 11cb7b4710 Fixed #961 (Tokenizer: call simplifyCasts() before removing "unsigned" keyword)
http://sourceforge.net/apps/trac/cppcheck/ticket/961
2009-11-14 17:01:59 +06:00
Daniel Marjamäki fee96f3cd6 Fixed #944 (new false positives against Wine Git Tree) 2009-11-14 09:06:28 +01:00