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.web09.60.1608139363574980598 for ; Wed, 16 Dec 2020 09:22:43 -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 4F084D6E; Wed, 16 Dec 2020 09:22:43 -0800 (PST) Received: from e120189.arm.com (unknown [10.57.25.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 503CC3F66E; Wed, 16 Dec 2020 09:22:42 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, ard.biesheuvel@arm.com, leif@nuviainc.com Cc: sami.mujawar@arm.com Subject: [PATCH v1 15/25] ArmPkg: Fix Ecc error 5007 in CpuDxe Date: Wed, 16 Dec 2020 17:21:50 +0000 Message-Id: <20201216172200.25846-16-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/Drivers/CpuDxe/AArch64/Mmu.c | 2 +- ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c index 9f894a743ae7..529aeaefa17e 100644 --- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c +++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c @@ -189,7 +189,7 @@ SyncCacheConfig ( ) { EFI_STATUS Status; - UINT32 PageAttribute = 0; + UINT32 PageAttribute; UINT64 *FirstLevelTableAddress; UINTN TableLevel; UINTN TableCount; diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 40bb8760f40d..cd8073418dba 100644 --- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c +++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c @@ -155,8 +155,8 @@ SyncCacheConfigPage ( EFI_STATUS Status; UINT32 i; volatile ARM_PAGE_TABLE_ENTRY *SecondLevelTable; - UINT32 NextPageAttributes = 0; - UINT32 PageAttributes = 0; + UINT32 NextPageAttributes; + UINT32 PageAttributes; UINT32 BaseAddress; UINT64 GcdAttributes; @@ -226,8 +226,8 @@ SyncCacheConfig ( UINT32 i; EFI_PHYSICAL_ADDRESS NextRegionBase; UINT64 NextRegionLength; - UINT32 NextSectionAttributes = 0; - UINT32 SectionAttributes = 0; + UINT32 NextSectionAttributes; + UINT32 SectionAttributes; UINT64 GcdAttributes; volatile ARM_FIRST_LEVEL_DESCRIPTOR *FirstLevelTable; UINTN NumberOfDescriptors; -- 2.17.1