[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] misra: add deviations of MISRA C Rule 5.5
On 7/28/25 12:36, Jan Beulich wrote: > On 25.07.2025 18:24, Dmytro Prokopchuk1 wrote: >> --- a/docs/misra/deviations.rst >> +++ b/docs/misra/deviations.rst >> @@ -142,6 +142,31 @@ Deviations related to MISRA C:2012 Rules: >> memmove. >> - Tagged as `deliberate` for ECLAIR. >> >> + * - R5.5 >> + - Clashes between bitops functions and macros names are deliberate and >> are >> + needed for input validation and error handling, ensures that the >> size of >> + the object being pointed to by 'addr' meets the minimum requirements >> for >> + the bit operation, preventing unsafe operations on improperly sized >> data >> + types that could lead to undefined behavior or memory corruption. >> + The macros encapsulate this conditional logic into a single, >> reusable form; >> + which simplifies the code, avoids redundant function call. >> + - Specified macros should be ignored. > > At the risk of going too far with nitpicking: Who are "specified macros" > here? The > text doesn't mention any names. In fact, the way it's written it could be > taken to > mean all macros there, including any that are yet to be added. I don't think > such > is appropriate for a deviation. > >> + * - R5.5 >> + - Clashes between 'pirq_cleanup_check' function and macro names are >> deliberate. >> + The purpose is to ensure that the specific cleanup action >> ('pirq_cleanup_check') >> + is performed conditionally when the parameter 'event channel number' >> equals >> + zero, otherwise it does nothing. >> + This approach simplifies the code, avoids redundant function call. >> + - Specified macro should be ignored. > > Here it's clear which macro is meant, but ... > >> + * - R5.5 >> + - Clashes between grant table functions and macros names are >> deliberate. >> + These macros address differences in argument count during >> compile-time, >> + effectively discarding unused parameters to avoid warnings or errors >> + related to unused arguments. >> + - Specified macro should be ignored. > > ... here it again isn't. > > Jan Thanks! I'll add macros names. Dmytro
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |