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

Method misra_21_12

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

Source from the content-addressed store, hash-verified

4007 self.reportError(directive, 21, 11)
4008
4009 def misra_21_12(self, data):
4010 if findInclude(data.directives, '<fenv.h>'):
4011 for token in data.tokenlist:
4012 if token.str == 'fexcept_t' and token.isName:
4013 self.reportError(token, 21, 12)
4014 if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in (
4015 'feclearexcept',
4016 'fegetexceptflag',
4017 'feraiseexcept',
4018 'fesetexceptflag',
4019 'fetestexcept')):
4020 self.reportError(token, 21, 12)
4021
4022 def misra_21_14(self, data):
4023 # buffers used in strcpy/strlen/etc function calls

Callers

nothing calls this directly

Calls 3

reportErrorMethod · 0.95
findIncludeFunction · 0.85
isFunctionCallFunction · 0.70

Tested by

no test coverage detected