[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] add more MISRA C rules to docs/misra/rules.rst
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 13 Jun 2022 09:36:16 +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=sQuwCcI0bX5m5k7OtMN3WGRcLdWEfSd1kqJrODpNTmQ=; b=gUDoNRkqnRMpExEDftRfKpurKP8zwtVcyvqiSlbu7ZCm1mE4bLFlEsegNV+waHtcF2hOV2R8NzrAG4HkP8xmGJhG++aM+qtwgELUmIk4yLN0o5SQTQxXsMmOU/iA323npKmCPq33NXd3suGE8PoVlzulQx+fBBTNIb+VmhCr+N55g28JLD8Sx+XlfUVAVKgkbe0LUYL92C41gzbo1ID5P2zwXiFuFueI7f/SBM6Ik4rveygn7OTFhvHxuUtf2QgodppHFRKc82yFIITcncowHFLkmBh76T6bKEU085DJksdEsZ+mUYDlf911HnyLLTLhftA5lRVC/I1hW91dwZ6fgA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GRO7fAaWPIUamz8Pz+cOx+cq12fPXR7dAqmi4g12sBusn38CS/GhHRrZzDQ1bl10HFEKEJ+HDDA3jcqRWUXUMalpihmrmwEmDczJtDsHWJCJwCPox5Hqa2R0TlCkLMBgVoqkAvxXasnZ6/eMAjrt41kfoRZdkLFRQpI0GRi3MqxkkG2cO/4+peFj2jEj5EwGwga8RSIEcDo5MKA+P53mpqOG72KCPa3oKDSrrJNmtc4PhbUwPuHNZbX0J6eADSyWszk2j6q97OBr+Ll6MP5iuoZc3dcPuPObCYQDJGBviH22zMgUVC+B2T8Tg+PLA9cWXrEnxLaxkZMb2dcx76RrdQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: George.Dunlap@xxxxxxxxxx, roger.pau@xxxxxxxxxx, Artem_Mygaiev@xxxxxxxx, Andrew.Cooper3@xxxxxxxxxx, julien@xxxxxxx, Bertrand.Marquis@xxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 13 Jun 2022 07:36:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 10.06.2022 23:27, Stefano Stabellini wrote:
> + * - `Rule 5.3
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_03.c>`_
> + - Required
> + - An identifier declared in an inner scope shall not hide an
> + identifier declared in an outer scope
> + - Using macros as macro parameters at invocation time is allowed
> + even if both macros use identically named local variables, e.g.
> + max_t(var0, min_t(var1, var2))
Nit: I would have been okay with the prior use of MIN() and MAX() in this
example, but now that you have switched to min_t() / max_t() I think the
example also wants to match our macros of these names. Hence I'd like to
suggest that either you switch to using min() / max() (which also use
local variables), or you add the missing "type" arguments in both macro
invocations.
Jan
|