[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, 31 Aug 2023 11:28:33 +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=2QUAgFrJtAGTeOb+9lVw09OYL1UkH/W5XKr1yWb31sU=; b=ZsGBjsMFyawXkBdwZYJVJAKZ/H3NvRayY3sIBUkuEOU0Ef5qpJTvkwOJWL+Kl/tHWNykRWsT75udpTr+j5QMSrT3i7uQ51su4/p1sd7UTRm71YecMVl6mFmgA2xJ58GHUvPGwCUCib0tov6XDaJc/faYv5AAVXg37nX4z8zHwks1sCazyCEWsmzIP9XrnnmptahlsKCFl5m9SdDTdFO9lZBK53AGhmDSLyATZaVq7l2n/UDBO3FpgkpLLA4Y8zq39xbmXIor8zyFBXF+yl1KbcSnWYXgNHCzt3LBjUwEm6XSsqBis2qV5kNNTcRRYvwXJJMJkZtsg8EAUoVxwSdkMQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7DF6LsYalU+nuqcyeNaETMtNr2NBDRwRqvygTCnp6AruVGtkn259KevQ4BgRTAJq7wjorlWAPrrHlGf7Ztvvtuwn9iu+zzc1R7nuOhnszGJ5KUYcmYPBOPwlhBAgZJnpP+m41OxrCxXMNE3xrlQjxR+7D7MEhnIbQVmm0ST9DoFBfGzLfKtvBtZ/WigHCJ2ER0P6mHX00GGXKhXeF+j97H2cgknNeEGx9mXn0fNW3Jw/Xfn+9DD9iBjVunLrtyWegMNELynhkgSg7nck0czB0ZXVkO3EkKa3oClsf1cgAgB58zqQYcvYPHjlIhrxnDC1mur61fVGYizMEA5qdi/dQ==
  • 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, 31 Aug 2023 09:28:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.08.2023 03:53, Stefano Stabellini wrote:
> @@ -332,6 +333,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 ?: statements.

As before - switch(sizeof(...)) and alike also wants deviating, imo.

> +       while(0) and while(1) are allowed.

... and alike ... (to also cover e.g. while(true)).

Jan



 


Rackspace

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