summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2020-12-10 13:07:43 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-06 16:22:54 +0000
commitc5bbf36c13af6a292c3a4a1cb7dc5c850c6c792f (patch)
tree2de958ce01152f5c342149ddff033a8a421722d4
parent3f0d3dfa0ec475912095456dd5dd3d8750028ae4 (diff)
downloadedk2-c5bbf36c13af6a292c3a4a1cb7dc5c850c6c792f.tar.gz
edk2-c5bbf36c13af6a292c3a4a1cb7dc5c850c6c792f.tar.bz2
edk2-c5bbf36c13af6a292c3a4a1cb7dc5c850c6c792f.zip
ArmPkg: Fix Ecc error 5007 in CpuDxe
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 <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
-rw-r--r--ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c2
-rw-r--r--ArmPkg/Drivers/CpuDxe/Arm/Mmu.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
index 4b6bc47e51..838803aa9b 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 2a668f0788..6c58d2b493 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;