I was reading on misra website that for assigning 0 to unsigned variable, 'u' must be suffixed.
For example:
1. Does that even on declaring array I should use this.Like
2. Also while using switch cases like:
If yes then what if variable passed to switch is of int8_t type. In above example if
For example:
Rich (BB code):
uint8_t my_cnt = 0U;
Rich (BB code):
uint8_t my_arr[10U];
Rich (BB code):
void func(uint8_t no)
{
switch(no)
{
case 1U:
break;
case 2U:
break;
}
}
Rich (BB code):
int8_t no;
Last edited by a moderator: