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

Method write

lib/checkunusedvar.cpp:318–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void Variables::write(nonneg int varid, const Token* tok)
319{
320 VariableUsage *usage = find(varid);
321
322 if (usage) {
323 usage->_write = true;
324 if (!usage->_var->isStatic() && !Token::simpleMatch(tok->next(), "= 0 ;"))
325 usage->_read = false;
326 usage->_lastAccess = tok;
327 }
328}
329
330void Variables::writeAliases(nonneg int varid, const Token* tok)
331{

Callers 2

storeInputFunction · 0.45

Calls 2

nextMethod · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected