On 06/10/2023 10:58, Nicola Vetrini wrote:
On 06/10/2023 11:27, Julien Grall wrote:
Hi,
On 05/10/2023 09:45, Nicola Vetrini wrote:
The constant 0 is used instead of NULL in '__ACCESS_ONCE' as a
compile-time check to detect non-scalar types; its usage for this
purpose is documented in rules.rst as an exception.
Documenting ACCESS_ONCE() in rules.rst seems a bit odd. I am guessing
that other analysis tool may point out the same error and therefore it
would seem more appropriate to use a deviation.
This would also avoid having a specific rule in the Eclair
configuration for __ACCESS_ONCE().
I figured a single accepted use would benefit from an explicit exclusion.
I can rework it to use an in-code comment to deviate, in whatever form
that comment may be
(still with some bits of ECLAIR-specific configuration anyway, as
discussed for R2.1).
I think it would be preferrable to have a deviation in the code. This
would be helpful for other analysis tools.
Furthermore, the 'access_field' and 'typeof_field' macros are
introduced as a general way to deal with accesses to structs
without declaring a struct variable.
Cleanup of spurious MISRA deviations.
Please don't do that. This is making the review of the patches a lot
more complicated because there are unrelated changes (see [1]).
We often allow simple clean-up if they are in the context. But this is
not the case here.
Understood. There will be a separate MISRA deviations cleanup/update
patch anyway,
so these can be included there.
Sounds good to me. Thanks!
Cheers,
--
Julien Grall