|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] docs/misra: new rules addition
On 09/06/23 10:46, Jan Beulich wrote: On 08.06.2023 13:02, Roberto Bagnara wrote:On 07/06/23 23:53, Stefano Stabellini wrote:On Wed, 7 Jun 2023, Jan Beulich wrote:+ * - `Rule 5.6 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_06.c>`_ + - Required + - A typedef name shall be a unique identifier + -Considering that the rule requires uniqueness across the entire code base (and hence precludes e.g. two functions having identically named local typedefs), I'm a little puzzled this was adopted. I for one question that a use like the one mentioned is really at risk of being confusing. Instead I think that the need to change at least one of the names is at risk of making the code less readable then, even if ever so slightly. (All of this said - I don't know if we have any violations of this rule.)I don't think we have many local typedefs and I think we have only few violations if I remember right. I'll let Roberto confirm how many. This rule was considered not a difficult rule (some difficult rules were found, namely 2.1, 5.5 and 7.4.) Typedefs being used this way can be deviated with tool configuration. Here is a list of candidates for that treatment: guest_intpte_t guest_l1e_t guest_l2e_t ret_ I am not sure about the latter. Please let me know if this is what you would prefer and possible additions to/removals from the above list. Kind regards, Roberto
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |