Commit Graph

6212 Commits

Author SHA1 Message Date
PKEuS 605fb9039a Merge pull request #391 from Dmitry-Me/resolveIssue1037098
Resolve CID 1037098
2014-09-06 23:17:52 +02:00
PKEuS 117e45f8af Merge pull request #395 from Dmitry-Me/fixBufferOverrun
Fix potential buffer overrun
2014-09-06 23:03:02 +02:00
PKEuS 4859b55ce6 Merge pull request #422 from simartin/ticket_6023
Ticket #6023: Properly handle template'd default template parameter values
2014-09-06 22:55:45 +02:00
Alexander Mai e4d0435976 Merge branch 'master' of https://github.com/danmar/cppcheck 2014-09-06 22:27:38 +02:00
Alexander Mai 6b26b6ed31 Fix read access to uninitialized variable 2014-09-06 22:27:13 +02:00
Simon Martin 6e10603227 Ticket #6023: Properly handle template'd default template parameter values. 2014-09-06 20:39:04 +02:00
PKEuS 35b00a5e05 Support rValue references in typedef (#1823) 2014-09-06 19:00:26 +02:00
Alexander Mai efab840b50 #5230 Explicit reinterpret_cast should not give a warning. Lower all invalidPointerCast messages to 'portability' 2014-09-06 13:09:02 +02:00
Alexander Mai 29b46cb505 #6132 crash: daca: kvirc CheckOther::checkRedundantAssignment() 2014-09-05 20:03:34 +02:00
Martin Ettl 8a15486370 Fixed CID-1234716: Dereference after null check in lib/checkio.cpp 2014-09-01 09:00:05 +02:00
PKEuS e8f7279039 Refactorization: Moved detection of STL strings to SymbolDatabase 2014-09-05 12:03:08 +02:00
PKEuS 4940da06c0 Calculate checksum only if necessary (#6129) 2014-09-05 11:05:21 +02:00
Simon Martin eeeb816db9 Ticket #6103: Simplify "new (type)" constructs into "new type" to avoid confusion upon certain input. 2014-09-05 08:02:18 +02:00
PKEuS 8c24553229 Support inherited member variables in setVarId (#4101) 2014-09-04 22:22:09 +02:00
Alexander Mai 5a96413220 #6127 crash on patch(?)-".c" file. Avoid segfault. 2014-09-04 21:28:18 +02:00
Alexander Mai 65f599bd9e Fix version number macros 2014-09-04 21:18:15 +02:00
Daniel Marjamäki b3e4abd82a Fixed Cppcheck warnings 2014-09-04 18:08:56 +02:00
Daniel Marjamäki 05617d7285 Fixed #6118 (False positive: divide by zero - if condition not evaluated properly) 2014-09-04 17:52:14 +02:00
PKEuS 800b57d87e Merge pull request #415 from Dmitry-Me/reducePatternsDuplication
Reduce patterns duplication
2014-09-04 07:46:59 +02:00
PKEuS 5d0aa15002 Merge pull request #416 from Dmitry-Me/removeDuplicateChecks
Remove duplicate checks
2014-09-04 07:46:45 +02:00
PKEuS e4a81f9666 Improved checksum algorithm to fix configurations being purged by coincidence (#6126):
- Better distribution of values by rotating the bits of the checksum for each token
2014-09-03 23:10:38 +02:00
Alexander Mai 270f59e76a Fix doxygen warning and astyle formatting 2014-09-03 20:38:41 +02:00
Dmitry-Me 68d650e9ac Remove duplicate checks 2014-09-03 14:17:34 +04:00
PKEuS 6d27ca6c9a Fixed SymbolDatabase if unnamed struct is casted and returned (#6125) 2014-09-03 11:15:05 +02:00
PKEuS bf2f76e70c Detect and purge duplicate configurations by calculating a checksum. 2014-09-02 22:35:52 +02:00
Alexander Mai a632f68345 #6122 segmentation fault (invalid code) in in valueFlowForLoop2. Simple fix and testcase. 2014-09-02 19:41:50 +02:00
Alexander Mai 45dc4ca6be Fix compiler warning. Re-order if-expression for performance reasons 2014-09-02 19:18:30 +02:00
Dmitry-Me 46d24c7bfb Reduce patterns duplication 2014-09-02 19:51:22 +04:00
Dmitry-Me 7342a81ea7 Minor refactorings. rename token. cleanup if/else. 2014-09-02 16:10:51 +02:00
PKEuS a52401cf1b Fixed some compiler warning about signed/unsigned conversions. 2014-09-02 11:44:51 +02:00
PKEuS 3e65cb446e Remove "auto" keyword (storage class specifier) from C++03 and C code (#4990). 2014-09-02 11:21:47 +02:00
PKEuS 2d608890a5 Improved message 'mismatchSize' (#4167) 2014-09-02 09:38:40 +02:00
PKEuS ddc19febb5 Merge pull request #413 from Dmitry-Me/improveCStyleCastsDetection
Improve C style casts detection
2014-09-02 08:07:53 +02:00
PKEuS 428f7a6f26 Attempt to fix crashs on clang test suite. 2014-09-01 23:29:15 +02:00
PKEuS 00044aabb0 Handle ternary operator in redundantAssignment check (#5964) 2014-09-01 23:16:52 +02:00
Alexander Mai a4ff30301a #5805 'Passing value -1.0 to sqrt() leads to undefined result' is incorrect. Degrade wrongmathcall from error to warning, since it deals with implementation-defined behaviour 2014-09-01 19:31:32 +02:00
PKEuS 80df3dc642 Disabled several checks and simplifications for C code, if they are C++-only. Do not match arguments for C code, since there can't be overloads. 2014-09-01 18:43:24 +02:00
amai2012 9bc0e3afd6 Merge pull request #412 from Dmitry-Me/moveChecksEarlier
Move cheap checks earlier to avoid more expensive ones
2014-09-01 17:49:45 +02:00
Dmitry-Me f937dde1e0 Improve C style casts detection 2014-09-01 16:40:28 +04:00
PKEuS 0995b85c09 Attempt to fix crashs when self-checking cppcheck introduced by previous commit 2014-09-01 14:12:43 +02:00
PKEuS 40e5dab9dc Refactorization in checkmemoryleak.cpp:
- Use Library to detect noreturn/notnoreturn functions
- Removed realloc from std.cfg as long as there is no proper way to configure such functions
2014-09-01 13:54:33 +02:00
PKEuS c92230dfee Fixed crash on garbage code introduced by recent commit. 2014-09-01 12:41:30 +02:00
PKEuS 20a066bb14 Run unreachableCode checking only on executable scopes (#5789) 2014-09-01 11:29:39 +02:00
PKEuS b5e064e737 Fixed unreachableCode message if a lambda is returned (#6008). 2014-09-01 11:10:42 +02:00
Dmitry-Me a6219adc9b Move cheap checks earlier to avoid more expensive ones 2014-09-01 12:52:27 +04:00
PKEuS 353a9e9a64 Bailout for duplicateBranch check if branches are empty (#5354) 2014-09-01 10:19:14 +02:00
PKEuS e35329aba3 Fixed reporting of unmatched suppressions for unusedFunction (#4946) 2014-09-01 10:13:03 +02:00
PKEuS 47764321f2 Several fixes to invalidScanfFormatWidthError():
- Different IDs for different messages (#5809)
- severity is warning, not style, so check _settings->isEnabled() properly
- Removed never shown message text
2014-09-01 09:33:58 +02:00
amai2012 d1d3c24f3e Merge pull request #411 from Dmitry-Me/moveDeclarationsCloserToWhereTheyreNeeded
Move declarations closer to where they're first used
2014-09-01 08:48:46 +02:00
PKEuS 59cccb83ce Reimplemented version.h:
- Use macros to form version number and string. CPPCHECK_MAJOR, CPPCHECK_MINOR and CPPCHECK_DEVMINOR now contain the parts of the version number.
- "dev" status is now detected by comparison of CPPCHECK_MINOR and CPPCHECK_DEVMINOR, version string created accordingly.

Fixed two comments.
2014-09-01 08:48:25 +02:00