misra.py - Rule 11.8 fixed in function arguments checks (#1288)

This commit is contained in:
Konrad Grochowski 2018-06-13 06:51:24 +02:00 committed by Daniel Marjamäki
parent 4d99300339
commit 8925a0fd81
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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
}