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

Method misra_21_3

addons/misra.py:3956–3959  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

3954 self.reportError(tok, 21, 2)
3955
3956 def misra_21_3(self, data):
3957 for token in data.tokenlist:
3958 if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in ('malloc', 'calloc', 'realloc', 'free')):
3959 self.reportError(token, 21, 3)
3960
3961 def misra_21_4(self, data):
3962 directive = findInclude(data.directives, '<setjmp.h>')

Callers

nothing calls this directly

Calls 2

reportErrorMethod · 0.95
isFunctionCallFunction · 0.70

Tested by

no test coverage detected