warning : 'integer conversion results in truncation'
问题 I get an warning here. The warning says 'integer conversion results in truncation'. It persists even if I remove the typecast(U16). typedef unsigned short U16; U16 mask; mask = ~(U16)(0x8000); How do I resolve this warning? I used the below code and removed the warning, but unsure if its the right way to do it. mask = (U16)(~(U32)(0x8000)); Thanks in advance! 回答1: C compilers don't like when you try to assign constant values into an L-value that's not big enough to hold them. I would guess