From 8925a0fd815cbc7edf5266aeee65fa98be237f53 Mon Sep 17 00:00:00 2001 From: Konrad Grochowski Date: Wed, 13 Jun 2018 06:51:24 +0200 Subject: [PATCH] misra.py - Rule 11.8 fixed in function arguments checks (#1288) --- addons/misra.py | 2 +- addons/test/misra-test.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 }