Commit Graph

12357 Commits

Author SHA1 Message Date
Martin Ettl 03fcac98a9 Merge pull request #477 from orbitcowboy/master
Improved test coverage of MathLib.
2014-12-09 08:07:37 +01:00
Dmitry-Me ff6604e289 Make expensive string manipulation depend on settings 2014-12-09 06:08:38 +01:00
Alexander Mai ec2c4aa2e3 #6301 Unused shared lock variable. Add exception for std::shared_lock() to CheckUnusedVar::checkFunctionVariableUsage_iterateScopes() 2014-12-07 15:32:09 +01:00
Alexander Mai d11eb4931a #6306 false positive with strxfrm NULL argument. Adjust std.cfg in favor of no false positive 2014-12-07 15:24:27 +01:00
Daniel Marjamäki 64e6b5186d astyle formatting 2014-12-05 06:41:47 +01:00
Alexander Mai c2584aa635 #6303 crash in CheckBufferOverrun. Add check on loop variable in CheckBufferOverrun::checkScope(). 2014-12-04 20:49:58 +01:00
Matthias Krüger 7a6cd54059 Fix [lib/tokenize.cpp:6184]: (warning) Found simple pattern inside Token::Match() call: ") {" 2014-12-04 11:11:47 +01:00
Robert Reif c5bfd21d48 Tokenizer::simplifyTypedef: Add test that #5191 is fixed (function pointer) 2014-12-04 05:43:58 +01:00
orbitcowboy b8cca63a76 Improved test coverage of MathLib. 2014-12-03 18:24:27 +01:00
Daniel Marjamäki e3892a95b5 Fixed #6290 (Tokenizer: Because 'and' is not simplified to '&&' there are false positives) 2014-12-03 16:32:05 +01:00
PKEuS d0ff8d87cb Merge pull request #476 from Dmitry-Me/cacheAndReuseValue2
Cache and reuse value
2014-12-02 20:54:27 +01:00
Dmitry-Me 7d259c073a Cache and reuse value 2014-12-02 16:19:52 +03:00
Matthias Krüger 33be0f4cb9 run dmake 2014-12-02 08:33:39 +01:00
Daniel Marjamäki 0b9d80c95d Refactoring CheckUnusedFunctions so it uses new infrastructure for multifile analysis 2014-12-02 06:41:18 +01:00
Dmitry-Me cf3f8c2f38 Refactoring: Replace names with underscores with camelCase names 2014-12-01 16:22:56 +01:00
amai2012 02298bf4d9 Merge pull request #474 from Dmitry-Me/reorderChecks
Reorder checks to avoid redundant actions
2014-11-30 20:20:08 +01:00
Dmitry-Me c0d2933ec7 Reorder checks to avoid redundant actions 2014-11-30 16:14:53 +03:00
Dmitry-Me 6482fefe3e Cache and reuse previously computed value 2014-11-30 13:00:27 +01:00
Dmitry-Me 5e37275b2a Code cleanup. Use 'isDelete' instead of token match 2014-11-28 17:50:23 +01:00
Dmitry-Me 828fdb6c47 Code cleanup. Omit redundant check. 2014-11-28 17:48:23 +01:00
Robert Reif 418c2e51a0 Fixed #3314 (cppcheck incorrectly reporting Syntax error.) 2014-11-28 17:44:36 +01:00
Robert Reif 0dad8b64e8 Fixed #6268 (False positive functionStatic (inconclusive) - nested namespaces) 2014-11-27 06:29:33 +01:00
Alexander Mai 1779921306 Increase test coverage for MathLib 2014-11-26 17:35:32 +01:00
Daniel Marjamäki 139414bd5c astyle formatting 2014-11-26 16:13:57 +01:00
Daniel Marjamäki 465555e39d Fixed memory leaks for non-solaris compilers. 2014-11-26 16:13:40 +01:00
amai2012 0913a51ccd Merge pull request #469 from lasergnu/SEGV
Fix SEGV on Solaris x86
2014-11-25 17:01:00 +01:00
Dmitry-Me f926958acb Fix false positive about return type when there's =delete in operator= declaration 2014-11-25 15:52:52 +01:00
Jay Sigbrandt f7eeb82ca4 Fix SEGV on Solaris x86
On Solaris x86, with both GCC 4.8 and 4.9, running cppcheck causes a segmentation fault when process terminates.

The backtrace (dbx) where
=>[1] _ZNSt14_List_iteratorIP5CheckEppEv(0x804798c, 0x8047994, 0xc0d61d6, 0x291a), at 0x8291b7c
  [2] std::list<Check*, std::allocator, <Check*>void>::remove(0x84ab328, 0x80479c8, 0x80479d4, 0x82d96fc), at 0x82da984
  [3] Check::~Check(0x84a9fc4, 0x83d232c, 0xfef411fb, 0x83d135c), at 0x82d9709
  [4] CheckExceptionSafety::~CheckExceptionSafety(0x84a9fc4, 0xfee82a40, 0xfee82a40, 0xfedcf000), at 0x8311e7d
  [5] __static_initialization_and_destruction_0(0x0, 0xffff, 0xfedd4c80, 0xfedcf000), at 0x81b01f8
  [6] _GLOBAL__sub_D__ZN20CheckExceptionSafety11destructorsEv(0x83d135c, 0xfedd4f18, 0x8047a50, 0x828a5f5, 0xfedcf000, 0x8047a68), at 0x81b023c
  [7] __do_global_dtors_aux(0xfedcf000, 0x8047a68, 0xfece28cd, 0x8047b08, 0x8047a48, 0xfedcf000), at 0x8185b90
  [8] _fini(0x8047b08, 0x8047a48, 0xfedcf000, 0xfedd4f00, 0x8047a80, 0xfecd4e72), at 0x828a5f5
  [9] _exithandle(0xfeffb7d8, 0x8185a1a, 0x0, 0x0, 0x0, 0x0), at 0xfece28cd
  [10] exit(0x1, 0x8047b70, 0x0, 0x8047ba3, 0x8047bba, 0x8047ce6), at 0xfecd4e72

The destructor order is somehow getting messed up on this platform.

This fix moves the code away from header file and ensures _instances remains valid during termination.
2014-11-25 14:03:46 +01:00
Matthias Krüger 9233e79390 run dmake 2014-11-24 07:42:54 +01:00
Daniel Marjamäki a002654c47 Reverted refactoring 828417c for now. It caused a major slowdown in the unused functions checking. 2014-11-24 06:37:08 +01:00
Dmitry-Me 298021af1f Remove redundant variable and manipulation thereof 2014-11-22 12:17:49 +01:00
Frank Zingsheim 9497732ac8 Fixed #6238 (false positive with double fopen) 2014-11-20 22:19:39 +01:00
Alexander Mai d4e59065df Fix some (clang) compiler warnings 2014-11-20 20:49:05 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
Daniel Marjamäki 9cbab3d8f1 Revert "Updated Artistic Style from version 2.03 to 2.05"
This reverts commit b1329bfb40.
2014-11-20 14:19:53 +01:00
orbitcowboy 4a2a4474c9 Fixed #6281: MathLib: Long integer suffix i64 is not supported. 2014-11-20 10:23:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
orbitcowboy b1329bfb40 Updated Artistic Style from version 2.03 to 2.05 2014-11-20 10:03:48 +01:00
Robert Reif d12f14844a Fixed #6279 (False Positive: Member variable 'Fred::i' is not initialized in the constructor) 2014-11-20 06:18:29 +01:00
Robert Reif b7c9187539 Fixed #6280 (MathLib: binary literals are integers) 2014-11-19 06:43:52 +01:00
Alexander Mai 1c191845fb Fix invalid assertion from recent commit. Make single argument givenACodeSampleToTokenize ctor explicit. 2014-11-18 19:52:06 +01:00
PKEuS 4163f1e122 Fixed #6260 - C++11 style array initialization 2014-11-18 19:50:09 +01:00
PKEuS 428587f3d4 Fixed #6275: Simplification of = (NULL); to = 0; 2014-11-18 19:39:38 +01:00
Alexander Mai 85c02df56c Fix compiler warning. run astyle 2014-11-18 19:36:47 +01:00
PKEuS ad8749c0bd Fixed #6278: Remove casts to references to pointers in Tokenizer::simplifyCasts() 2014-11-18 19:23:59 +01:00
PKEuS b76619e0c1 Merge pull request #465 from Dmitry-Me/removeRedundantActions2
Omit unneeded operations
2014-11-18 19:02:48 +01:00
Dmitry-Me 34bd612ea9 Omit unneeded operations 2014-11-18 16:35:36 +03:00
Dmitry-Me e12d280e90 Code cleanup. Omit redundant actions. 2014-11-18 06:38:19 +01:00
Alexander Mai 8bcf833bb7 Cure null pointer access within Scope::findFunction introduced by recent cs 2014-11-17 23:10:00 +01:00
Alexander Mai 0ba3c15c52 Cure null pointer access within Scope::findFunction introduced by recent cs 2014-11-17 23:05:15 +01:00