Commit Graph

3547 Commits

Author SHA1 Message Date
Edoardo Prezioso 2dd53ec966 Fixed ticket #3485 (segmentation fault of cppcheck ( {a:1;}; )) 2012-01-09 16:24:11 +01:00
Edoardo Prezioso 54f54761b4 Fixed ticket #3482 (segmentation fault of cppcheck ( switch(){case} )) 2012-01-09 14:37:20 +01:00
Edoardo Prezioso 57fcde8090 Fixed ticket #3481 (segmentation fault of cppcheck) 2012-01-09 13:39:02 +01:00
Edoardo Prezioso a951d34aa8 Fixed ticket #3480 (segmentation fault of cppcheck) 2012-01-09 12:48:52 +01:00
Reijo Tomperi 194327048a Add InternalError and change MathLib to throw it in case of an error.
- Previously MathLib errors did not provide a filename, but after this change at least source file name should be printed
and if token is provided, also line number should be printed.
- Change also Token to use InternalError
- Modify Cppcheck-class to catch InternalError instead of Token
- Run dmake to update Makefile
2012-01-08 22:19:44 +02:00
PKEuS c273d6d31d Refactorized checkautovariables.cpp. Removed indendation counters.
Fixed #3478
2012-01-08 15:32:22 +01:00
Kamil Dudka e09b0330e4 Class: Don't warn about uninitialized union members because they are often combined with a second variable 2012-01-08 12:17:55 +01:00
Daniel Marjamäki 65ce55e675 Fixed #3472 (false positive: (error) Passing value 0 to log() leads to undefined result) 2012-01-08 12:07:25 +01:00
Daniel Marjamäki ee55d3294a Refactoring. Assume that .C files contain C code on case insensitive filesystems. 2012-01-08 10:34:31 +01:00
Daniel Marjamäki 304980848f Fixed #3473 (False positive: variable is assigned value that is never used (used in return statement)) 2012-01-08 08:44:18 +01:00
Daniel Marjamäki 70c83d9ca9 Fixed #3467 (False positive: Variable is not assigned a value (new)) 2012-01-08 08:31:00 +01:00
Reijo Tomperi 93e3e7361e In unix .C is considered C++. Changed isC() and isCPP() to work like they were before refactoring. 2012-01-07 10:47:15 +02:00
Daniel Marjamäki 36797a97ef Symbol database: Fixed comments 2012-01-07 09:37:38 +01:00
Daniel Marjamäki 6a63104743 Fixed #3320 (False positive: Member variable is not initialized in the constructor (namespaces).) 2012-01-07 09:28:26 +01:00
Reijo Tomperi e91d239ea5 Refactor: Move file extension checks from Tokenizer to Path class. This has also functional change as now also file.JAVA is considered a Java file. 2012-01-06 21:56:28 +02:00
Daniel Marjamäki 5ae7c4506f Fixed #3015 (xml-style error output when running testrunner on particular tests) 2012-01-06 09:09:46 +01:00
Daniel Marjamäki 73d9dc870e TestRunner: Make sure no xml output is reported when running TestToken (#3015) 2012-01-06 09:03:23 +01:00
Daniel Marjamäki bd8c21fc6b Refactoring: Made Preprocessor::simplifyCondition nonstatic 2012-01-06 08:42:07 +01:00
Daniel Marjamäki 66472b09c0 Refactoring: Made Preprocessor::match_cfg_def nonstatic 2012-01-06 08:15:48 +01:00
Daniel Marjamäki 94d220e370 Refactoring: Made Preprocessor::getcode nonstatic 2012-01-06 08:01:50 +01:00
Daniel Marjamäki 07776e90ad Preprocessor: cleanup 2012-01-05 18:37:15 +01:00
Jussi Lehtola 55b65718c7 fix gcc-4.7 compiler error (missing include) 2012-01-05 14:36:30 +01:00
Edoardo Prezioso a7029291fd Tokenizer::simplifyGoto: process also derived class/structs. 2012-01-04 17:08:53 +01:00
Edoardo Prezioso 6f9cd110d0 Improve Tokenizer: improve 'simplifyDoublePlusAndDoubleMinus' when there are negative numbers. 2012-01-04 13:45:27 +01:00
Edoardo Prezioso 75fbe310ff Extract various functions inside the Tokenizer class and fix tokenization of 'return __LINE__ ;'. 2012-01-04 12:57:58 +01:00
PKEuS eabdc9082e Fixed false positives related to %*[] in scanf format string (#3468) 2012-01-04 11:22:42 +01:00
Edoardo Prezioso 8d84e5f852 testrunner: assert-like functions should take linenr parameter as a 'unsigned int' (maybe in the future these should be converted to 'size_t'?);
fix discrepancy between 'todoAssertEquals' and 'AssertEquals' so that the parameters 'expected, wanted, actual and current' are 'long long' types.
2012-01-03 15:48:03 +01:00
Edoardo Prezioso c76f06c01b Fixed ticket #3447 (Improve void CheckStl::if_find()) 2012-01-02 23:12:59 +01:00
Daniel Marjamäki e4f3f91c18 Reverted 9aa8a496. I don't know why I made this fix. 2012-01-02 19:45:20 +01:00
Edoardo Prezioso 38ee7523ad Remove redundant testcase I forgot to remove in previous commit. 2012-01-02 19:41:08 +01:00
Daniel Marjamaki cb22e04a36 Visual Studio: Generated new msvc2010 project files with qmake 2012-01-02 16:28:45 +01:00
PKEuS 621d43e9e4 Fixed #3461: Support for %m* on scanf-functions 2012-01-02 14:05:58 +01:00
PKEuS 38ddcde7b0 - Refactorizations in preprocessor.cpp and tokenizer.cpp
- Bugfix: tok->stringify(tok) returns now "".
- Removed most of the inline-asm handling in preprocessor; improved the remaining handling of #asm/#endasm: Simplified to "asm(...);" statement
2012-01-02 12:58:34 +01:00
PKEuS 064e0ea0d0 Revert "- Refactorizations in preprocessor.cpp and tokenizer.cpp"
Committing with subversion seems to have issues. Sorry for that. I'll the changes again, now using git.

This reverts commit 69498de6ca.
2012-01-02 12:10:53 +01:00
Philipp K 69498de6ca - Refactorizations in preprocessor.cpp and tokenizer.cpp
- Bugfix: tok->stringify(tok) returns now "".
- Removed most of the inline-asm handling in preprocessor; improved the remaining handling of #asm/#endasm: Simplified to "asm(...);" statement
2012-01-02 03:15:02 -08:00
Daniel Marjamäki 01759b03f9 Fixed #3463 (Uninitialized variable variable pointer) 2012-01-02 11:25:13 +01:00
Daniel Marjamäki 112873e876 Revert "Fixed #3450 (CLI --report-progress is currently useless)"
This reverts commit e769fe6294.
2012-01-02 07:42:39 +01:00
Daniel Marjamäki e769fe6294 Fixed #3450 (CLI --report-progress is currently useless) 2012-01-02 07:27:45 +01:00
Edoardo Prezioso eb657034ba Handle also C# multidimensional arrays with no specified dimension. 2012-01-02 00:22:45 +01:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Erik Lax 3d0c1a3301 Fix #3457 (Statement following goto can be executed)
http://sourceforge.net/apps/trac/cppcheck/ticket/3457
2012-01-01 00:11:03 +02:00
Edoardo Prezioso 38e0e25ce0 Fixed ticket #3448 (segmentation fault of cppcheck).
Add testcase related to previous commit (add 'A f(&x);' as declaration of variable).
2011-12-31 21:44:07 +01:00
Daniel Marjamäki 8a6b1dc1c9 Fixed #3449 (segmentation fault of cppcheck) 2011-12-31 12:08:49 +01:00
Edoardo Prezioso 8f2ad53332 Add testcase for previous commit. 2011-12-30 18:47:42 +01:00
Edoardo Prezioso 873572d489 Improve C# simplification code with arrays of arrays. 2011-12-30 12:26:28 +01:00
Daniel Marjamäki 6a0c463ebd #3382 (Clarify error message 'invalid deallocation') 2011-12-30 10:32:55 +01:00
Daniel Marjamäki 2ae48c7aef Fixed #3454 (false positive: (style) Variable 'iFaktor' is assigned a value that is never used) 2011-12-30 09:47:15 +01:00
Marek Zmysłowski dd8316474a Fixed #3335 (new check: warn about potential missuse of isgraph-like functions) 2011-12-29 08:08:37 +01:00
Daniel Marjamäki 6d98406d71 Fixed #3444 (False positive using putenv) 2011-12-29 07:35:27 +01:00
Reijo Tomperi 0a588496a0 Fix astyle and test failures. 2011-12-28 22:05:10 +02:00