Commit Graph

101 Commits

Author SHA1 Message Date
Daniel Marjamäki db274e8308 Fix testrunner in cygwin 2018-02-10 15:34:49 +01:00
Daniel Marjamäki 71511f3131 Refactor f487182 2018-02-06 08:59:36 +01:00
Ivan Maidanski f487182075 Suppressed unused functions should not lead to nonzero exit code (#1026) (#1078)
This is a fix of commit 97ffec8.
2018-02-06 07:44:53 +01:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ivan Maidanski 97ffec85c0 Fixed #7502 (Correct exit code if never used function is found) (#1026) 2018-01-12 08:24:01 +01:00
Dmitry-Me 45996b1404 Simplify code, read attribute once 2017-08-24 18:23:44 +03:00
Ayaz Salikhov b8cd7dbb5c Use nullptr instead of 0 or NULL (#936) 2017-08-09 20:00:26 +02:00
uburuntu f4ce49d883 ENH: perfomance: using clear() and empty() more faster for stl containers 2017-06-02 22:38:00 +04:00
Sam Truscott 956b5812e7 Fixed #7866 (Crash while scanning QML files) 2017-05-28 16:39:18 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
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