91 Commits

Author SHA1 Message Date
PKEuS
b1f4bd7504 Refactorization: Reimplemented Settings::_enabled as a bitfeld instead of std::set (#7995) 2017-04-11 11:49:26 +02:00
orbitcowboy
24332b540d There is no need to clear a class member string in the Ctor. 2016-12-27 21:20:17 +01:00
Daniel Marjamäki
ea905c9a36 Unused Functions: use buildDir if specified. Otherwise use old approach. 2016-12-09 20:11:20 +01:00
Daniel Marjamäki
e9d950d4f5 Cppcheck build dir: Better handling when --project is used 2016-12-08 22:46:44 +01:00
PKEuS
120fe2e4d6 Fixed false positive: The function 'operatorstd::string' is never used. (#7853) 2016-12-08 13:54:54 +01:00
Daniel Marjamäki
1245f1d621 Unused Functions: Fix checking when --cppcheck-build-dir is used. 2016-11-07 21:49:58 +01:00
Daniel Marjamäki
b607e83648 Try to fix travis 2016-11-05 21:45:31 +01:00
Daniel Marjamäki
350e5a7142 UnusedFunctions: Perform checking using analyzeinfo 2016-11-05 21:26:56 +01:00
Matthias Krüger
892a81055d CheckUnusedFunctions::analyzerInfo(): remove unused parameter 'filename'.
Was:

lib/checkunusedfunctions.cpp: In member function ‘std::__cxx11::string CheckUnusedFunctions::analyzerInfo(const string&) const’:
lib/checkunusedfunctions.cpp:292:67: warning: unused parameter ‘filename’ [-Wunused-parameter]
 std::string CheckUnusedFunctions::analyzerInfo(const std::string &filename) const
                                                                   ^~~~~~~~
2016-11-01 13:34:26 +01:00
Daniel Marjamäki
e77d76525e CheckUnusedFunction: generate better analyzerinfo 2016-10-31 20:43:57 +01:00
Daniel Marjamäki
9ff3e85899 Added --cppcheck-build-dir flag 2016-10-29 12:18:11 +02:00
PKEuS
9a6569fde1 Always set ErrorMessage::file0 to ensure that the source file that cppcheck is checking when an error occurs can be identified
Removed unused function and unused includes from preprocessor.h/cpp
2016-07-26 16:28:40 +02:00
Daniel Marjamäki
920ac5a3f6 astyle formatting
[ci skip]
2016-07-16 21:21:24 +02:00
Roberto Martelloni
25525e38a7 CWE mapping of incorrectStringCompare, literalWithCharPtrCompare, charLiteralWithCharPtrCompare, incorrectStringBooleanError, staticStringCompare, stringCompare, signConversion, unusedFunction, unusedVariable 2016-07-16 10:07:06 +01:00
Daniel Marjamäki
79e663dd6f Settings: Remove '_' prefix for public member variables 2016-01-03 16:18:17 +01:00
Lauri Nurmi
996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Dmitry-Me
398da8ea7c Cache and reuse result of expensive operation 2015-12-22 14:03:45 +03:00
Daniel Marjamäki
0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
Alexander Mai
0b225fa02f 2nd attempt to fix crash in CheckUnusedFunctions::check. CheckBufferOverrun::checkBufferAllocatedWithStrlen: Don't check for 'new' in C code. 2015-06-28 18:34:09 +02:00
Alexander Mai
02a3a01eca Fix compiler warnings 2015-06-28 18:07:31 +02:00
Alexander Mai
2c73518e29 Fix platform-dependent test result, formatting and crash in whole program analysis 2015-06-28 17:54:48 +02:00
amai2012
4a47b8b3ae Refactoring: Better distinguish between C and C++ in a few checks. 2015-06-28 16:49:16 +02:00
PKEuS
b2835051df Refactorization: Renamed Token::Match pattern %var% to %name%, implement new pattern %var% which is true if varId > 0. 2015-01-31 12:32:04 +01:00
PKEuS
8225b12763 Fixed some cppcheck messages 2015-01-28 22:29:07 +01:00
Thomas Jarosch
4bec2b58fd Unused function check: Fix detection of func.usedOtherFile
Check if function is called from another file or not.
2015-01-07 11:29:37 +01:00
Daniel Marjamäki
ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
PKEuS
493ab541ab Fixed #6291 and #6293: Support :: in front of function name in checkUnusedFunctions
Simplified code in CheckUnusedFunctions
2014-12-09 22:04:51 +01:00
Daniel Marjamäki
0b9d80c95d Refactoring CheckUnusedFunctions so it uses new infrastructure for multifile analysis 2014-12-02 06:41:18 +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
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
Dmitry-Me
57c379d300 Cleanup variable names, reduce unneeded operations 2014-09-17 15:52:03 +04:00
PKEuS
8722bba52a Fixed false positive #4648 2014-08-31 20:33:27 +02:00
PKEuS
d93d7401c6 Moved getSourceFilePath(), isC() and isCPP() from Tokenizer to TokenList
Conflicts:
	lib/tokenize.cpp
2014-06-04 18:36:25 +02:00
PKEuS
9bfc2b618b Fixed crashes random crashes in multithreading caused by useless creation of CheckUnusedFunctions instance per thread. 2014-04-13 11:56:38 +02:00
PKEuS
e8c7a723f5 Fixed five new true positives in cppcheck, silenced one new false positive (see #5618) 2014-03-27 15:50:30 +01:00
PKEuS
6c4e8761c8 Fixed false positive "unused function" #5113. 2014-03-26 12:34:21 +01:00
PKEuS
848d079c71 Refactorized detection of function usage in CheckUnusedFunction, fixed #5358 2014-03-26 09:12:41 +01:00
PKEuS
02f38772cc Refactorization: Use SymbolDatabase to find functions in CheckUnusedFunctions 2014-03-26 08:54:56 +01:00
Robert Reif
e26bd5b99c Fixed #5563 (add __attribute__((destructor)) and improve __attribute__((constructor)) support) 2014-03-14 18:17:21 +01:00
Thomas Jarosch
c80f272176 Run astyle 2014-03-14 15:51:15 +01:00
Sam Truscott
5dc13f3538 Tidy up the code for cppcheck style. 2014-03-13 16:47:00 +00:00
Sam Truscott
3d0524ecc6 Update the detection of the arguments in Qt's invokeMethod.
invokeMethod can invoke functions by name (string) rather than a
direct function call (i.e. reflection). The old code wasn't
correctly parsing out the argument which contained the name
of the function to call.

This resulted in that function being reported as unused when it is.
2014-03-13 16:43:25 +00:00
Sam Truscott
385478d89e Reflection no longer part of markup. Some tokeniser not done on markup. 2014-03-11 15:57:28 +01:00
Lauri Nurmi
70a67eaf85 Change some more 0 literals into nullptr. 2014-02-16 13:38:50 +02:00
Daniel Marjamäki
23efc68dd7 use nullptr 2014-02-16 10:32:10 +01:00
Daniel Marjamäki
fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki
a94fccf51a astyle formatting 2014-01-02 21:47:35 +01:00
Sam Truscott
4333dd3c75 Update Qt to support Markup structure 2014-01-02 18:18:24 +01:00
Daniel Marjamäki
e446a28b3d Refactoring FileLister and Path so they don't depend on Library 2013-10-31 19:09:01 +01:00
Sam Truscott
6806fd8135 Extended Qt support through Library 2013-10-20 14:09:10 +02:00