Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Implicit type convertion
#1
My question is why my code test program (lint) generate an error when read this line.

U16 u16value;
U8 u8value;

u16value = (U16) u8value / 10U;

I think that line is absolutly compliance with misrac.

but in other hand this other line does not generate an error, but i think that it is not misra compliance.

U16 u16value;
U8 u8value;

u8value = (U16) u8value / (U16)10U;
<t>Embedded System</t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)