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

Re: [XEN PATCH v2 4/4] x86emul: remove local variable to address MISRA C:2012 Rule 5.3


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 31 Jul 2023 13:53:49 +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=imOmaTds8fMDWiVdJoDNGj1OHQOgFq6px+l/HTwbCKo=; b=CS+rB8CCDDhknn9uuvxZrf3Yt0TYvQ7WnI10aAjTpIQcEneNSnHyd3tyAiDpB9oMXHKTeQE5dq8hRScPvXjkUlMSvZRnJRQeR2McAes8tq8RlhQa2DBhJXHDDZ6hwye+04nFT4p3UaDJlPGRCkKrR7hXO7LbPOYf/RBFjhiAjcWsb3S2OUQ8dMUx+KuA4VH5NsM+VffY9EIh2ztzTt7Hzn2ISWNbVUIDfW5tv3i4E5AB0PsxM9L1FEGoowC9E+E+NlhkUlxBULJrWebbze5z9w5JnYS52+geUiv+08uiOyFas1QJBh+7d/hUc4fjiJKxqUBKLfBn3vdXPhYyfQqA3w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=abETt4sPeMiXB0FiNM+436NMHjwDBdbX1UKhyr2w7YMwj+UwJrK9C2qUVu8Vwm+aNrpUIu4OACu/Fthh/nSWKrYj96KJCh2g5fo5seVCUzb2XKVP0rvYOKu/WV0EuxAdbff+Gj5+Ub72tTUpdxseErL1ejVjwJMYXNZAPkGK6HxgiGKsxpmeeBE1H/CymxG5PCF4D8D4GTclQK2KZyXS64uEm+Eu/dbfkmD6himv4r57XgN3Peqc67JbgFQBZvAb86mfWLPR5AD4HJ9CwEuRCPasRVepddQPfsu5cB8J0Gylmc1F4yuEYHsKH8w9z0GlmoiEQpUWK46iTKzhKLd4QQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 31 Jul 2023 11:53:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.07.2023 09:33, Nicola Vetrini wrote:
> The local variable removed by this commit shadowed another declared in
> an outer scope and thus violates Rule 5.3. It was introduced as part of
> a refactoring by commit abf5fb62f73d0dbeabc6a8cd6dbb55174b36c8d1.
> 
> No functional changes.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Albeit, just to mention it, the description could have done with making
clear why the removal is actually correct (nothing like this can be
inferred from pointing at the variable's introduction). But well ...

Jan



 


Rackspace

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