Commit Graph

6425 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Robert Reif c5e15950df Fixed #6230 (SymbolDatabase: Wrong function() is set for token) 2014-11-17 16:04:44 +01:00
Robert Reif 7c4a137e14 Fixed #6274 (MathLib::isFloat doesn't recognize long double literal suffix L or l) 2014-11-17 06:53:32 +01:00
Alexander Mai 45ff012b2c Small doxygen fixes 2014-11-16 19:40:04 +01:00
Daniel Marjamäki 828417c934 CheckUnusedFunction: Refactorings to use same infrastructure for whole program analysis as CheckUninitVar and CheckBufferOverrun 2014-11-15 18:44:23 +01:00
Daniel Marjamäki de7e9223b8 Fixed #6272 (Improve check: multifile checking in checkbufferoverrun) 2014-11-15 10:43:49 +01:00
Dmitry-Me 353b885948 CheckOther::invalidPointerCast: Incorrect interpretation of settings 2014-11-14 20:22:17 +01:00
Dmitry-Me fefb0ca912 Reuse previously computed values 2014-11-14 13:24:56 +03:00
orbitcowboy b9a9f51fe0 MathLib: Added test for isDec() and removed not required state. 2014-11-14 04:29:35 +01:00
Alexander Mai 5300ba2074 Make single-argument constructors explicit 2014-11-13 21:39:14 +01:00
Alexander Mai 0f007fa24e Increase CPPCHECK_DEVMINOR to 68 2014-11-13 21:36:57 +01:00
Dmitry-Me cb9a6c1cb5 Don't show warning for same expressions alongside == in static_assert 2014-11-13 16:04:34 +01:00
Robert Reif 67385cfc4b Symboldatabase: improved look up of delegate constructors 2014-11-13 06:29:51 +01:00
Daniel Marjamäki 189dfd64f7 Revert "Fixed #6230 (SymbolDatabase: Wrong function() is set for token)"
This reverts commit 685fce6b91.
2014-11-11 07:29:16 +01:00
Daniel Marjamäki ea765c24f2 Fixed #3262 (Tokenizer: wrong 'return a=1,b=2,...;' simplification;) 2014-11-10 17:31:19 +01:00
Simon Martin cc6b51f2d9 Ticket #6059: Properly handle class... in parameter lists. 2014-11-07 23:08:54 +01:00
Daniel Marjamäki 685fce6b91 Fixed #6230 (SymbolDatabase: Wrong function() is set for token) 2014-11-07 11:10:20 +01:00
Daniel Marjamäki 8012ac9562 Fixed #5993 (FP: memleak (linux list)) 2014-11-07 07:44:12 +01:00
Frank Zingsheim 7e0fc3d481 Fixed #6252 (False positive "freed twice")
--HG--
extra : rebase_source : 24f801452fbefa3a59ab2cca62c3cf02aea513b6
2014-11-03 21:24:34 +01:00
PKEuS e5d63195cb Fixed #5983: Support storing pointers/references to member variables in CheckClass::checkConst() 2014-11-02 13:38:03 +01:00
Robert Reif df6855c216 SymbolDatabase: reintroduce test, move symboldatabase cleanup code to SymbolDatabase destructor 2014-11-02 10:36:52 +01:00
Frank Zingsheim 0e4c508d7b Fixed #4272 and #6237 (Crash from running out of memory with many templates) 2014-11-01 22:07:24 +01:00
Alexander Mai fe468ac142 cppcheck compilation fails with g++4.6.3. Patch from mavik1 2014-11-01 20:21:15 +01:00
Robert Reif 4eb33e7479 SymbolDatabase: Refactoring of findFunction 2014-11-01 14:36:17 +01:00
Daniel Marjamäki b766071272 Fixed #4970 (false positive: conditionally initialized variable used in if-clause (git/notes.c)) 2014-11-01 14:03:02 +01:00
PKEuS c7d315fba3 Refactorization: Changed simplifyMathFunctions() to a single pass simplifier 2014-10-31 23:08:11 +01:00
PKEuS f8371f65f0 Refactorization: Avoid string copying. 2014-10-31 22:36:44 +01:00