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

Re: [XEN PATCH v2 2/3] drivers/char: address MISRA C:2012 Rule 5.3


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 1 Aug 2023 15:36:31 +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=hozC17tjp/omz3GU5XAC+yq/4W5SBZ74JNY0BYP1XQU=; b=gevGrBb6iAHHgmVe/es0x2Vnbu6GrRMb8gtxXw6dTjgJ9437cY3K9q29Dz5CSMRu/U6gdJz4aP1UQ9Q+gJbhpjkcYef7yO9PXXvr9aY5ZHI5icrgMtx233raegYdbENSbZNIIjmsbaYj3m4LzvI3nOQuNtzfEMeirLjP7dOQrn0IQRRjUn5c19C/0ttbw2h59utiKt8uWxhYEF/TS2BaQuSDj3LImQAQEaC+I203ep/rZ2rtNjDJ90mq53zuwsPNWdiaKjexWEXlut1cTggBYYFJpEHuKxIieiqBBkDqIZbb9tEDiZtcfjQHeZ74HGaqn4n16JnqIThOz0ZDZoRelg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e4ITu7ZdNEDYe8tPY23Di+f5HOzumdazDSq4CPS7mIeH1Pd0ZmirhnTy6CHQ2fbOlfbCV1HOKlUJ7NN3MMZx98g8I7PVgIeWy6LiH2wjOKv0Z4u6oojdKPIFujFh/5tscAHpqoiaDNZPonCkwY2gSJe4tnw6mLZ0c4Vkj0YcK6qIFxGkAKjLMlbIfOBzOnwKffPrNA8HMymRVQqA25FQ8cVB4NoSMEdAOshi2rjpcfUhToPWJanMHTETWxLmWr2TNlPWqcb8VNOY/w3GgKZNfMWHM6VkS6NLQefdfyEvzcordrDi1HLpns8LnCEfdjJMo1Ka6RuEetO9mPh0eZVc1Q==
  • 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>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 01 Aug 2023 13:36:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.08.2023 14:47, Nicola Vetrini wrote:
> The following strategies are adopted to deal with violations
> of MISRA C:2012 Rule 5.3:
> "An identifier declared in an inner scope shall not hide an
> identifier declared in an outer scope".
> 
> Local variable 'ctrl' shadows a variable defined in an outer scope.
> Since the innermost variable is used only once after being set, it is safe
> to remove it entirely.
> 
> The enum constant 'baud' is shadowed by local a local variable at line
> 1476, and renaming the enum constant avoid such conflicts.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>





 


Rackspace

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