Skip to content

Commit 2e5ed8f

Browse files
committed
Preprocessor: fixed unusedFunction selfcheck warning
1 parent a46dab4 commit 2e5ed8f

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

lib/preprocessor.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -742,25 +742,6 @@ static simplecpp::DUI createDUI(const Settings &mSettings, const std::string &cf
742742
return dui;
743743
}
744744

745-
bool Preprocessor::hasErrors(const simplecpp::Output &output)
746-
{
747-
switch (output.type) {
748-
case simplecpp::Output::ERROR:
749-
case simplecpp::Output::INCLUDE_NESTED_TOO_DEEPLY:
750-
case simplecpp::Output::SYNTAX_ERROR:
751-
case simplecpp::Output::UNHANDLED_CHAR_ERROR:
752-
case simplecpp::Output::EXPLICIT_INCLUDE_NOT_FOUND:
753-
case simplecpp::Output::FILE_NOT_FOUND:
754-
case simplecpp::Output::DUI_ERROR:
755-
return true;
756-
case simplecpp::Output::WARNING:
757-
case simplecpp::Output::MISSING_HEADER:
758-
case simplecpp::Output::PORTABILITY_BACKSLASH:
759-
break;
760-
}
761-
return false;
762-
}
763-
764745
const simplecpp::Output* Preprocessor::handleErrors(const simplecpp::OutputList& outputList)
765746
{
766747
const bool showerror = (!mSettings.userDefines.empty() && !mSettings.force);

lib/preprocessor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ class CPPCHECKLIB WARN_UNUSED Preprocessor {
146146
const simplecpp::Output* handleErrors(const simplecpp::OutputList &outputList);
147147

148148
private:
149-
static bool hasErrors(const simplecpp::Output &output);
150-
151149
static void simplifyPragmaAsmPrivate(simplecpp::TokenList &tokenList);
152150

153151
/**

0 commit comments

Comments
 (0)