MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / redundantConditionError

Method redundantConditionError

lib/checkcondition.cpp:1387–1392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1385}
1386
1387void CheckConditionImpl::redundantConditionError(const Token *tok, const std::string &text, bool inconclusive)
1388{
1389 if (diag(tok))
1390 return;
1391 reportError(tok, Severity::style, "redundantCondition", "Redundant condition: " + text, CWE398, inconclusive ? Certainty::inconclusive : Certainty::normal);
1392}
1393
1394//-----------------------------------------------------------------------------
1395// Detect "(var % val1) > val2" where val2 is >= val1.

Callers 1

getErrorMessagesMethod · 0.80

Calls 2

diagFunction · 0.70
reportErrorFunction · 0.70

Tested by

no test coverage detected