misra.py: Fixed FN for rule 21.8
This commit is contained in:
parent
49df3d811a
commit
870b8b9c60
|
@ -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')):
|
||||
if isFunctionCall(token) and (token.astOperand1.str in ('abort', 'exit', 'getenv', 'system')):
|
||||
self.reportError(token, 21, 8)
|
||||
|
||||
def misra_21_9(self, data):
|
||||
|
|
|
@ -1768,6 +1768,7 @@ 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue