Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.1
#5
There will be a violation of rule 10.1 on the 0x8E and 0xAD because the type of the initialised object is "unsigned char".
In MISRA C:2012 this rule was relaxed so that assigning conversions (including initialisations) on signed literals to an unsigned type are permitted providing the value fits in the unsigned type.

In response to your other question. Example suites for both MISRA C:2004 and MISRA C:2012 can be found in the MISRA C resources section of this bulletin board at Board Index > Resources > MISRA C resources, which is accessible when logged in to the bulletin board.

Both example suites are also availble at https://gitlab.com/MISRA/MISRA-C/
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)