14-02-2019, 12:29 PM
This response assumes that
* "brk_itbv_p_brk_hsd_isense.Voltage_Filtered_u32" has an unsigned type of 32 bits
* u16 is an unsigned type of 16 bits.
The //essential type// resulting from the "/" operation will be an unsigned type of 32 bits.
Casting an unsigned type of 32 bits to an unsigned type of 16 bits is not a violation of rule 10.8 as it is a cast to the same //essential type category// and is to a narrower type.
* "brk_itbv_p_brk_hsd_isense.Voltage_Filtered_u32" has an unsigned type of 32 bits
* u16 is an unsigned type of 16 bits.
The //essential type// resulting from the "/" operation will be an unsigned type of 32 bits.
Casting an unsigned type of 32 bits to an unsigned type of 16 bits is not a violation of rule 10.8 as it is a cast to the same //essential type category// and is to a narrower type.
Posted by and on behalf of the MISRA C Working Group