misra.py: Rule 21.8, added missing exit() function.

This commit is contained in:
orbitcowboy 2018-05-09 16:48:49 +02:00
parent bcae3ce9d4
commit c39e3467a4
2 changed files with 2 additions and 1 deletions

View File

@ -1266,7 +1266,7 @@ def misra_21_7(data):
def misra_21_8(data):
for token in data.tokenlist:
if isFunctionCall(token) and (token.astOperand1.str in {'abort', 'getenv', 'system'}):
if isFunctionCall(token) and (token.astOperand1.str in {'abort', 'exit', 'getenv', 'system'}):
reportError(token, 21, 8)

View File

@ -388,6 +388,7 @@ void misra_21_8() {
abort(); // 21.8
getenv("foo"); // 21.8
system(""); // 21.8
exit(-1); // 21.8
}
void misra_21_9() {