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

Function getRealBufferTok

lib/checkbufferoverrun.cpp:72–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static const Token* getRealBufferTok(const Token* tok) {
73 if (!tok->isUnaryOp("&"))
74 return tok;
75
76 const Token* op = tok->astOperand1();
77 return (op->valueType() && op->valueType()->pointer) ? op : tok;
78}
79
80static int getMinFormatStringOutputLength(const std::vector<const Token*> &parameters, nonneg int formatStringArgNr, const Settings& settings)
81{

Callers 2

bufferOverflowErrorMethod · 0.85

Calls 2

isUnaryOpMethod · 0.80
astOperand1Method · 0.80

Tested by

no test coverage detected