05-10-2016, 05:25 AM
Firstly, this is the MISRA C 2004 sub-forum but you posted MISRA C 2012 rules:)
Secondly, i think this is a false positive from whatever tool you are using.
If you look at rule 10.5, a cast from essentially signed to essentially floating is allowed.
In my book that supersedes rule 10.3, although it is not clearly mentioned in the standard.
Rules 10.1 and 10.4 are for arithmetic operations which is not the case here -> tool error.
Rule 11.1 applies to function pointers -> epic tool error:)
Secondly, i think this is a false positive from whatever tool you are using.
If you look at rule 10.5, a cast from essentially signed to essentially floating is allowed.
In my book that supersedes rule 10.3, although it is not clearly mentioned in the standard.
Rules 10.1 and 10.4 are for arithmetic operations which is not the case here -> tool error.
Rule 11.1 applies to function pointers -> epic tool error:)
<t></t>