Commit Graph

3404 Commits

Author SHA1 Message Date
Daniel Marjamäki 0705dbd34a Tokenizer::simplifyCasts: don't simplify 'f((double)(v1)*v2)' to 'f(*v2)' 2012-02-18 14:26:00 +01:00
PKEuS 2ba2a4e6ae Some refactorizations 2012-02-18 11:55:05 +01:00
Daniel Marjamäki bfb4dd6425 Fixed #3529 (False 'Boolean result is used in bitwise operation' in a template) 2012-02-18 08:51:09 +01:00
Edoardo Prezioso a08dab3776 Fixed warning about order of variable initialisations in Settings constructor. 2012-02-17 21:22:42 +01:00
Edoardo Prezioso 17cd5ec906 Fixed ticket #3604 (cppcheck(1.53) crash). 2012-02-17 21:14:38 +01:00
PKEuS 485e836535 Refactorizations in MathLib.
Fixed recently introduced bug on floating point numbers with multiple preceding zeros (for example 004.123)
2012-02-17 19:54:53 +01:00
PKEuS 8ea5df62c4 - Improved support for numbers in code:
-- Use MathLib::toLongNumber for conversion in tokenizer (Fix #3610)
-- Handle octal numbers in tokenizer
- Refactorizations in MathLib::toLongNumber and Settings
2012-02-17 15:47:08 +01:00
Zachary Blair 9d75641ef8 Fixed #3598 (false positive: (error) Memory pointed to by 'a' is freed twice.) 2012-02-16 21:03:38 -08:00
Ettl Martin d8c24c3afc fixed wrong spelled word. 2012-02-15 22:57:20 +01:00
Daniel Marjamäki 04e4b5d14d lib: fix for my previous commit. If there are no dependencies then don't insert dependencies 2012-02-15 08:13:42 +01:00
Daniel Marjamäki 8f3d511871 lib: allow that file dependencies are taken from Cppcheck after a check 2012-02-15 08:08:28 +01:00
PKEuS 2e13a51d08 Fixed #3591 2012-02-13 19:46:45 +01:00
PKEuS df0cb89a40 Fixed compiler error 2012-02-13 18:48:44 +01:00
PKEuS bb319c1c96 Improved Tokens and Tokenizer:
- Better handling of deleteThis() as last element of token list
- Code simplified
2012-02-13 17:44:08 +01:00
Daniel Marjamäki da8abeb63c Fixed #3584 (2 internal errors : Token::Match called with varid 0) 2012-02-12 17:30:47 +01:00
Erik Lax f1dbd1a89a Fixed #3518 (False negative: Possible null pointer dereference (in the same condition)) 2012-02-11 16:15:38 +01:00
PKEuS 42f418db54 - Improved nullpointer check: Fixed #1171
- Improved accuracy of function analysis in symboldatabase
- Code cleanups
2012-02-11 12:26:48 +01:00
Daniel Marjamäki c33dbb80fb 1.53: Updated version info 2012-02-11 08:17:07 +01:00
Daniel Marjamäki 4511d0fe5f fixed cppcheck inconclusive warning, possible null pointer dereference otherwise condition is redundant 2012-02-11 08:07:19 +01:00
Daniel Marjamäki bbb707c460 Fixed #3587 (Wrong tokenizer simplification - variable assigned by operator>>) 2012-02-07 08:05:50 +01:00
Daniel Marjamäki 47c7e346aa Uninitialized variables: Another fix for false positives when it's known that inner conditions are true 2012-02-06 19:26:28 +01:00
Daniel Marjamäki d6a887e1f9 Uninitialized variables: Fixed false positives when goto is simplified and inner condition is known to be true/false 2012-02-06 07:32:29 +01:00
Daniel Marjamaki fbb5ebe3c6 Fixed #3577 (Preprocessor: Defines given on command line are not used in the code) 2012-02-05 20:48:28 +01:00
Zachary Blair 8f827aa65f FIxed #3581 (double free false positive when exception rethrown) 2012-02-04 11:24:40 -08:00
PKEuS d5c2c7db88 - Moved checkCatchExceptionByValue from CheckOther to CheckExceptionSafety
- Fixed false positive: throw outerCatchVar; in inner catch is now correctly handled
- Added eTry and eCatch to Scope::isLocal -> Scopes inside catch are now detected by symbol database
2012-02-02 16:17:42 +01:00
Daniel Marjamäki 2be85e9d37 Fixed #3538 (false positive caused by bad tokenizer simplification) 2012-02-01 21:13:26 +01:00
Daniel Marjamäki 036b2a84bf Fixed #3570 (False Postive for 'nullPointer' check) 2012-02-01 20:38:47 +01:00
Edoardo Prezioso f9ade9562c Fixed ticket #3572 (segmentation fault). 2012-01-31 22:32:28 +01:00
Edoardo Prezioso bc034095f1 Fixed ticket #3543 (segmentation fault of cppcheck). 2012-01-31 19:34:55 +01:00
Edoardo Prezioso 66e1761ffe Fixed ticket #3571 (segmentation fault of cppcheck while scanning gcc-testsuite). 2012-01-31 18:42:19 +01:00
PKEuS 22c1ce8a68 Fixes for #3480 and #3568. 2012-01-31 15:49:34 +01:00
Edoardo Prezioso 9f81b48dc1 Fixed ticket #3558 (Tokenizer: improve simplifyVarDecl to take count of undefined size VLA's). 2012-01-30 23:41:43 +01:00
Edoardo Prezioso 0fd7504295 Related to ticket #3560 (conditional pointer user): remove also dead code in the lower scope if the actual scope isn't special. 2012-01-30 21:43:23 +01:00
Edoardo Prezioso 11e724df46 Tokenizer::simplifyTypedef: some optimizations on new code. 2012-01-30 17:08:35 +01:00
Edoardo Prezioso 7cd36f44b6 Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': finished. 2012-01-30 16:38:04 +01:00
Edoardo Prezioso 67d095a10e Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 16:20:15 +01:00
Edoardo Prezioso 7c596a2b90 Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 16:18:42 +01:00
Edoardo Prezioso 187c463475 Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 16:17:57 +01:00
Edoardo Prezioso b366bf69ad Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 16:16:08 +01:00
Edoardo Prezioso fa077ede94 Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 15:08:01 +01:00
Edoardo Prezioso 9438d1c2d0 Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 15:04:41 +01:00
Edoardo Prezioso fe3fd1a073 Tokenizer::simplifyTypedef: redundant assignment to 'offset'. 2012-01-30 13:33:27 +01:00
Edoardo Prezioso 5a1585dcfb Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': work in progress.. 2012-01-30 13:24:31 +01:00
Edoardo Prezioso d9e9c0aceb Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': in progress.. 2012-01-30 13:15:25 +01:00
Edoardo Prezioso 017f0090fa Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': begin conversion. 2012-01-30 13:10:50 +01:00
Edoardo Prezioso e530d770e1 Tokenizer::simplifyTypedef: to be sure there are no problems, promote to 'int' the variable 'offset'. 2012-01-30 13:04:10 +01:00
Edoardo Prezioso a93af0dba6 Tokenizer:: Use 'link' instead of 'parens' variable. 2012-01-30 12:22:37 +01:00
Daniel Marjamäki 9df6088ddd Revert "really fix #3527 (Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers)"
This reverts commit a37031944e.

I don't want this hard coding of macro names. Feel free to come with a more generic solution if you want.
2012-01-30 06:15:41 +01:00
Robert Reif 415aaca6dd Merge branch 'master' of git://github.com/danmar/cppcheck 2012-01-28 20:59:51 -05:00
Robert Reif a37031944e really fix #3527 (Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers) 2012-01-28 20:58:51 -05:00