commaai / panda

code powering the comma.ai panda
MIT License
1.54k stars 783 forks source link

MISRA Deviations #2037

Open maxime-desroches opened 2 months ago

maxime-desroches commented 2 months ago

Central issue to declare all the current MISRA deviations.

ID MISRA C Ref Category Scope Justification Status
1 Rule 11.4 Advisory Project casting from void pointer to type pointer is ok. Done by STM libraries as well Pending
2 Rule 11.5 Advisory Project casting from void pointer to type pointer is ok. Done by STM libraries as well Pending
3 Rule 15.1 Advisory Project as stated in the Misra document, use of goto statements in accordance to 15.2 and 15.3 is ok Pending
4 Rule 15.1 Advisory Project as stated in the Misra document, use of goto statements in accordance to 15.2 and 15.3 is ok Pending
5 Rule 19.2 Advisory Project union types can be used Pending
6 Rule 20.10 Advisory Project Pending
7 Rule 9.3 Required File Need to be fixed
8 Rule 21.2 Required File Pending
9 Rule 21.2 Required File Pending
10 Rule 11.3 Required File already checked that it's properly aligned Pending
11 Rule 11.3 Required File already checked that it's properly aligned Pending
12 Rule 21.2 Required File Pending
13 Rule 8.4 Required File Pending
14 Rule 1.2 Advisory File allow __typeof__ extension Pending
15 Rule 1.2 Advisory File allow __typeof__ extension Pending
16 Rule 1.2 Advisory File allow __typeof__ extension Pending
17 Rule 21.1 Required File this just provides a standard implementation of NULL in lieu of including libc in the panda build Pending
18 Rule 1.2 Advisory File allow __typeof__ extension Pending
19 Rule 2.7 Advisory File Seems like a false positive Need to be fixed
20 Rule 2.5 Advisory Project cppcheck will consider all macros, even those behind #ifdef guards. Probably need to fix cppcheck before doing that (or switching from macros to real variables) Need to be fixed