Skip to content

Commit

Permalink
fixed -Wunused-member-function Clang compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Nov 16, 2023
1 parent 1437550 commit 7215c5d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
14 changes: 0 additions & 14 deletions lib/forwardanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ namespace {
return evalCond(tok, ctx).first;
}

// cppcheck-suppress unusedFunction
bool isConditionFalse(const Token* tok, const Token* ctx = nullptr) const {
return evalCond(tok, ctx).second;
}

template<class T, class F, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )>
Progress traverseTok(T* tok, F f, bool traverseUnknown, T** out = nullptr) {
if (Token::Match(tok, "asm|goto"))
Expand Down Expand Up @@ -874,15 +869,6 @@ namespace {
return nullptr;
}

static bool isConditional(const Token* tok) {
const Token* parent = tok->astParent();
while (parent && !Token::Match(parent, "%oror%|&&|:")) {
tok = parent;
parent = parent->astParent();
}
return parent && (parent->str() == ":" || parent->astOperand2() == tok);
}

static Token* getStepTokFromEnd(Token* tok) {
if (!Token::simpleMatch(tok, "}"))
return nullptr;
Expand Down
16 changes: 0 additions & 16 deletions lib/infer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@ namespace {
std::vector<MathLib::bigint> minvalue, maxvalue;
std::vector<const ValueFlow::Value*> minRef, maxRef;

std::string str() const
{
std::string result = "[";
if (minvalue.size() == 1)
result += std::to_string(minvalue.front());
else
result += "*";
result += ",";
if (maxvalue.size() == 1)
result += std::to_string(maxvalue.front());
else
result += "*";
result += "]";
return result;
}

void setMinValue(MathLib::bigint x, const ValueFlow::Value* ref = nullptr)
{
minvalue = {x};
Expand Down

0 comments on commit 7215c5d

Please sign in to comment.