Revert "misra.py: Fixed FN for rule 21.8"
This reverts commit 870b8b9c60
.
This commit is contained in:
parent
870b8b9c60
commit
055d111ee9
|
@ -3451,7 +3451,7 @@ class MisraChecker:
|
||||||
|
|
||||||
def misra_21_8(self, data):
|
def misra_21_8(self, data):
|
||||||
for token in data.tokenlist:
|
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)
|
self.reportError(token, 21, 8)
|
||||||
|
|
||||||
def misra_21_9(self, data):
|
def misra_21_9(self, data):
|
||||||
|
|
|
@ -1768,7 +1768,6 @@ static void misra_21_7(void) {
|
||||||
static void misra_21_8(void) {
|
static void misra_21_8(void) {
|
||||||
abort(); // 21.8
|
abort(); // 21.8
|
||||||
(void)getenv("foo"); // 21.8
|
(void)getenv("foo"); // 21.8
|
||||||
(void)system("cmd"); // 21.8
|
|
||||||
exit(-1); // 21.8
|
exit(-1); // 21.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue