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

Method misra_22_5

addons/misra.py:4182–4187  ·  view source on GitHub ↗
(self, cfg)

Source from the content-addressed store, hash-verified

4180 self.reportError(token, 21, 21)
4181
4182 def misra_22_5(self, cfg):
4183 for token in cfg.tokenlist:
4184 if token.isUnaryOp("*") or (token.isBinaryOp() and token.str == '.'):
4185 fileptr = token.astOperand1
4186 if fileptr.variable and cppcheckdata.simpleMatch(fileptr.variable.typeStartToken, 'FILE *'):
4187 self.reportError(token, 22, 5)
4188
4189 def misra_22_7(self, cfg):
4190 for eofToken in cfg.tokenlist:

Callers

nothing calls this directly

Calls 4

reportErrorMethod · 0.95
isUnaryOpMethod · 0.80
isBinaryOpMethod · 0.80
simpleMatchMethod · 0.80

Tested by

no test coverage detected