commaai / commaai/panda

MISRA Deviations

Open
#2,037 0 comments 0 reactions 0 assignees View on GitHub
MISRA
Dominant language
C
Stars
1.7k
Forks
981
Avg merge
13m
Merged PRs (30d)
18

Description

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](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/drivers/can_common.h#L42) | | Need to be fixed |
| 8 | Rule 21.2 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L18) | | Pending |
| 9 | Rule 21.2 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L31) | | Pending |
| 10 | Rule 11.3 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L38) | already checked that it's properly aligned |Pending |
| 11 | Rule 11.3 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L39) | already checked that it's properly aligned | Pending |
| 12 | Rule 21.2 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L63) | | Pending |
| 13 | Rule 8.4 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/libc.h#L63) | | Pending |
| 14 | Rule 1.2 | Advisory | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/utils.h#L1) | allow \_\_typeof\_\_ extension | Pending |
| 15 | Rule 1.2 | Advisory | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/utils.h#L15) | allow \_\_typeof\_\_ extension | Pending |
| 16 | Rule 1.2 | Advisory | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/utils.h#L23) | allow \_\_typeof\_\_ extension | Pending |
| 17 | Rule 21.1 | Required | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/utils.h#L32) | this just provides a standard implementation of NULL in lieu of including libc in the panda build | Pending |
| 18 | Rule 1.2 | Advisory | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/safety_declarations.h#L8) | allow \_\_typeof\_\_ extension | Pending |
| 19 | Rule 2.7 | Advisory | [File](https://github.com/commaai/panda/blob/afafb0ba4613a224702fc4fd7a3197d596833b81/board/stm32h7/lli2c.h#L7) | 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 |

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.