[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 08:45:35 +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=hTEq8pADGz2EO+j7a4nuwMYO9LhYm+ZTH593a7lhEyU=; b=QxXlHiJOPMGWsgIIJEUEWgubg7YQFFZ4eQeJoYO7FvMdTFr98YEi6GEXivg/6/wjtnJyXlWWsjLG1Wmk+jb4S9oWdpB8tjWGQ16gFFrPXg93tANTqHtZqVU3YIgqxe/deWIncnQQ64EYF4tcbZMs/jB0s09UgUfRWDxT85SBDHoKfnyIX4d7k2kGLgHP3DhS6udzQnnkv4TZZjc7e1VRib0zRf8UWMZRSnZcTXPwskdFSEmVORnXdGghfOLpVQ7E74Mr5AjrI98DdEFWHogNePgW+q9rxFYTplD3m6w8Hf9XTupppSC9mG4CbDN1WpjAh2Lt/1B02riMXfRz5SnRDQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hw7TYHLVzT0q11XKnZWhKFkV3mSMbXJ6kJ6Az3KqqJe2+i0cKeYDwufUCjIV0PGsB3hLltwqb5SVfwM3XQp28Rbu2peiy1srNe2BF58dc7/RVOb2WoBS6KTy7Ae23nkQvTJD3jpcmAuMotcC9+28jqy0EQPIEmX3V2soGvlbY54xO0HzK2NUO3Omn2k2kby43Xy6qZD60g8wZA1+1rAyx0nJDXPgEyM7gcPCKo5ZTcqagaFijx+tROAKQuk6T+YpiHmzwJjKjKexPsyQDJWxMgUvtJLIb2E9BaAsz5lTXr47HGJeX5RvDA4x/ZmhSaWxlp77sJ3E8FmY6+25XCzh7w==
  • 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 06:45:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.09.2023 03:21, Stefano Stabellini wrote:
> On Thu, 31 Aug 2023, Jan Beulich wrote:
>> 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.
> 
> I added the switch, but without the words "and alike" because it is not
> clear in this context what it would allow.

Well, what I mean here are expressions involving sizeof() (or e.g also
offsetof()).

Jan



 


Rackspace

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