diff --git a/addons/misra.py b/addons/misra.py index d00a8f56d..28a74d9a8 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -1001,7 +1001,7 @@ def misra_11_8(data): continue if argtok.valueType.pointer == 0: continue - const1 = argvar.isConst + const1 = argvar.constness const2 = arguments[argnr - 1].valueType.constness if (const1 % 2) < (const2 % 2): reportError(token, 11, 8) diff --git a/addons/test/misra-test.c b/addons/test/misra-test.c index 1d143972c..96fbcd794 100644 --- a/addons/test/misra-test.c +++ b/addons/test/misra-test.c @@ -211,6 +211,7 @@ void misra_11_7(int *p, float f) { } char * misra_11_8(const char *str) { + misra_11_8(str); // no-warning return (char *)str; // 11.8 }