Fixed #11000 (misra: crash)
This commit is contained in:
parent
1e40a2e73e
commit
b444c002e2
|
@ -1837,7 +1837,7 @@ class MisraChecker:
|
|||
usedParameter = parametersUsed[i]
|
||||
parameterDefinition = functionDeclaration.argument.get(i+1)
|
||||
|
||||
if usedParameter.isString and parameterDefinition.nameToken:
|
||||
if usedParameter.isString and parameterDefinition and parameterDefinition.nameToken:
|
||||
reportErrorIfVariableIsNotConst(parameterDefinition.nameToken, usedParameter)
|
||||
|
||||
def misra_8_1(self, cfg):
|
||||
|
|
|
@ -315,6 +315,7 @@ static const char *misra_7_4_return_const (void) { return 1 + "return_const"; }
|
|||
static void misra_7_4_const_call(int a, const char* b) { } // 2.7
|
||||
static void misra_7_4_const_ptr_call(int a, const char const* b) { } // 2.7
|
||||
static void misra_7_4_call(int a, char* b) { } // 2.7
|
||||
static void misra_7_4_call_2(int a, ...) { } // 2.7
|
||||
|
||||
static void misra_7_4(void)
|
||||
{
|
||||
|
@ -330,6 +331,7 @@ static void misra_7_4(void)
|
|||
misra_7_4_const_call(1, ("text_const_call"));
|
||||
misra_7_4_const_ptr_call(1, ("text_const_call"));
|
||||
misra_7_4_call(1, "text_call"); // 7.4 11.8
|
||||
misra_7_4_call_2(1, "a", "b");
|
||||
}
|
||||
|
||||
const misra_8_1_a; // 8.1 8.4
|
||||
|
|
Loading…
Reference in New Issue