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

Method uninitvarError

lib/checkuninitvar.cpp:1558–1569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1556}
1557
1558void CheckUninitVarImpl::uninitvarError(const Token *tok, const std::string &varname, ErrorPath errorPath)
1559{
1560 if (diag(tok))
1561 return;
1562 errorPath.emplace_back(tok, "");
1563 reportError(std::move(errorPath),
1564 Severity::error,
1565 "legacyUninitvar",
1566 "$symbol:" + varname + "\nUninitialized variable: $symbol",
1567 CWE_USE_OF_UNINITIALIZED_VARIABLE,
1568 Certainty::normal);
1569}
1570
1571void CheckUninitVarImpl::uninitvarError(const Token* tok, const ValueFlow::Value& v)
1572{

Callers 1

getErrorMessagesMethod · 0.80

Calls 11

astIsRHSFunction · 0.85
astParentMethod · 0.80
isKnownMethod · 0.80
diagFunction · 0.70
reportErrorFunction · 0.70
simpleMatchFunction · 0.70
isEnabledMethod · 0.45
expressionStringMethod · 0.45
isInconclusiveMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected