parent
d09a6514cd
commit
f444696d5c
|
@ -3333,7 +3333,9 @@ class MisraChecker:
|
|||
continue
|
||||
if token.str != '(' or token.astParent:
|
||||
continue
|
||||
if not token.previous.isName or token.previous.varId:
|
||||
if not token.astOperand1 or not token.astOperand1.isName:
|
||||
continue
|
||||
if token.astOperand1.varId and get_function_pointer_type(token.astOperand1.variable.typeStartToken) is None:
|
||||
continue
|
||||
if token.valueType is None:
|
||||
continue
|
||||
|
|
|
@ -1739,6 +1739,9 @@ static void misra_17_6(int x[static 20]) {(void)x;} // 17.6
|
|||
static int calculation(int x) { return x + 1; }
|
||||
static void misra_17_7(void) {
|
||||
calculation(123); // 17.7
|
||||
int (*calc_ptr)(int) = &calculation;
|
||||
calc_ptr(123); // 17.7
|
||||
int y = calc_ptr(123);
|
||||
}
|
||||
|
||||
static void misra_17_8(int x) {
|
||||
|
|
Loading…
Reference in New Issue