[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] docs/misra: add 14.3


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 7 Sep 2023 09:12:25 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TfU8m8MkVilqCzECsUk6lwLNz06CE3YNEd/+ssdY99Y=; b=gYFCVAKHjdk7LaxUeyWPtNgOHTQ9XZotg0hbT1sjPoQsYcGFXb/5PNeOS/OEeaegpxwU3erAkB6A9R3ecqfNnMUDMLGrUcaIhZj5bP6sl3SU6QQZWzTyfZya4Cb58WS5AHgeso2BTQkSosLrKUNYjY7sT5MspTszylNhscvgL3c6b7c7oZSM/aPNi+Z4xoRXGv9kiYpcOY11hhfrhyLLXyNBmxSPX/PM5CBFCXGIbSoZSsEPV/cMReuv1oKNmJXvif7yOrdowSnjGDaxvgeksntUVlepPDS8RI1D1qsn3Rz39g1gIPd9Xnxy39Qku7ofqs9kuln+O394Ek7SJ27zew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KvwiKdGDHnIQGuT6y9NJ2MPFzhHUXUDC5gV/nsVvQaPXeijM8br7QLdHx9oEA1jYy0eeONHGyMEfr08vmfnGumY+bgJg3wjxBwsZNQ5+8xipG2HxXj67QJpbt3lAv9IyduRx51gYHxYpJt4gGf1uaFwRgax5/w9CAWqjnvJgs20gQM7AK/tX0XaVagtD/O4+/5FB2D+mW97XLOGUTKURirZfFaIGEuEgDxhMFen/zT76pY7pyGGPlDDnD2bdutUGbgry6wvLUPtllkI0XNPIciW6XSd5hNnFm1O//DA3r/MEgs1OJCjjXrhYM34Ogjqxpy6BxihhEmHPUkA1shKw3A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, julien@xxxxxxx, george.dunlap@xxxxxxxxxx, bertrand.marquis@xxxxxxx, roberto.bagnara@xxxxxxxxxxx, nicola.vetrini@xxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 07 Sep 2023 07:12:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.09.2023 03:22, Stefano Stabellini wrote:
> @@ -385,6 +386,17 @@ maintainers if you want to suggest a change.
>       - A loop counter shall not have essentially floating type
>       -
>  
> +   * - `Rule 14.3 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_14_03.c>`_
> +     - Required
> +     - Controlling expressions shall not be invariant
> +     - Due to the extensive usage of IS_ENABLED, sizeof compile-time
> +       checks, and other constructs that are detected as errors by MISRA
> +       C scanners, managing the configuration of a MISRA C scanner for
> +       this rule would be unmanageable. Thus, this rule is adopted with
> +       a project-wide deviation on if ?: and switch statements.

Do we want to go as far as permitting this uniformly for all switch()? In
my earlier reply I had included sizeof() for a reason.

Also (nit) there's at least a comma missing after "if". To make clear it's
keywords that are meant, maybe better use if() / switch()?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.