Misra: Fix FP, rule 10.8
This commit is contained in:
parent
d6570b01e1
commit
196b530ede
|
@ -48,6 +48,7 @@ void misra_10_6(u8 x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void misra_10_8(u8 x) {
|
void misra_10_8(u8 x) {
|
||||||
|
y = (u16)x;
|
||||||
y = (u16)(x+x); // 10.8
|
y = (u16)(x+x); // 10.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,6 +363,8 @@ def misra_10_8(data):
|
||||||
continue
|
continue
|
||||||
if not token.astOperand1.valueType or token.astOperand1.valueType.pointer>0:
|
if not token.astOperand1.valueType or token.astOperand1.valueType.pointer>0:
|
||||||
continue
|
continue
|
||||||
|
if not token.astOperand1.astOperand1:
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
intTypes = ['char', 'short', 'int', 'long', 'long long']
|
intTypes = ['char', 'short', 'int', 'long', 'long long']
|
||||||
index1 = intTypes.index(token.valueType.type)
|
index1 = intTypes.index(token.valueType.type)
|
||||||
|
|
Loading…
Reference in New Issue