Revert "misra.py: Fixed FN for rule 21.8"

This reverts commit 870b8b9c60.
This commit is contained in:
Daniel Marjamäki 2021-08-30 19:50:36 +02:00
parent 870b8b9c60
commit 055d111ee9
2 changed files with 1 additions and 2 deletions

View File

@ -3451,7 +3451,7 @@ class MisraChecker:
def misra_21_8(self, data):
for token in data.tokenlist:
if isFunctionCall(token) and (token.astOperand1.str in ('abort', 'exit', 'getenv', 'system')):
if isFunctionCall(token) and (token.astOperand1.str in ('abort', 'exit', 'getenv')):
self.reportError(token, 21, 8)
def misra_21_9(self, data):

View File

@ -1768,7 +1768,6 @@ static void misra_21_7(void) {
static void misra_21_8(void) {
abort(); // 21.8
(void)getenv("foo"); // 21.8
(void)system("cmd"); // 21.8
exit(-1); // 21.8
}