From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.64.1608139371715989067 for ; Wed, 16 Dec 2020 09:22:51 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 713E21FB; Wed, 16 Dec 2020 09:22:51 -0800 (PST) Received: from e120189.arm.com (unknown [10.57.25.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4B6F73F66E; Wed, 16 Dec 2020 09:22:50 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, ard.biesheuvel@arm.com, leif@nuviainc.com Cc: sami.mujawar@arm.com Subject: [PATCH v1 21/25] ArmPkg: Fix Ecc error 5007 in ArmMmuLib Date: Wed, 16 Dec 2020 17:21:56 +0000 Message-Id: <20201216172200.25846-22-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216172200.25846-1-Pierre.Gondois@arm.com> References: <20201216172200.25846-1-Pierre.Gondois@arm.com> From: Pierre Gondois This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois --- The changes can be seen at: https://github.com/PierreARM/edk2/commits/1552_Ecc_ArmPkg_v1 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c index c7f2744c4fac..6d8249510bbf 100644 --- a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c +++ b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c @@ -220,7 +220,7 @@ UpdateSectionEntries ( IN UINT64 Attributes ) { - EFI_STATUS Status = EFI_SUCCESS; + EFI_STATUS Status; UINT32 EntryMask; UINT32 EntryValue; UINT32 FirstLevelIdx; @@ -231,6 +231,8 @@ UpdateSectionEntries ( VOID *Mva; volatile ARM_FIRST_LEVEL_DESCRIPTOR *FirstLevelTable; + Status = EFI_SUCCESS; + // EntryMask: bitmask of values to change (1 = change this value, 0 = leave alone) // EntryValue: values at bit positions specified by EntryMask -- 2.17.1