]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Fix Ecc error 5007 in CpuDxe
authorPierre Gondois <Pierre.Gondois@arm.com>
Thu, 10 Dec 2020 13:07:43 +0000 (13:07 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 6 Jan 2021 16:22:54 +0000 (16:22 +0000)
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>
ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c

index 4b6bc47e51850a345f8f0198f251d5bfb6b78e87..838803aa9b4432b9e36cc851f077cbb65255dd49 100644 (file)
@@ -189,7 +189,7 @@ SyncCacheConfig (
   )\r
 {\r
   EFI_STATUS                          Status;\r
-  UINT32                              PageAttribute = 0;\r
+  UINT32                              PageAttribute;\r
   UINT64                             *FirstLevelTableAddress;\r
   UINTN                               TableLevel;\r
   UINTN                               TableCount;\r
index 2a668f078811b11817eefcb62086602f165b547d..6c58d2b493175540718be38a663f3e31007c9b7c 100644 (file)
@@ -155,8 +155,8 @@ SyncCacheConfigPage (
   EFI_STATUS                          Status;\r
   UINT32                              i;\r
   volatile ARM_PAGE_TABLE_ENTRY       *SecondLevelTable;\r
-  UINT32                              NextPageAttributes = 0;\r
-  UINT32                              PageAttributes = 0;\r
+  UINT32                              NextPageAttributes;\r
+  UINT32                              PageAttributes;\r
   UINT32                              BaseAddress;\r
   UINT64                              GcdAttributes;\r
 \r
@@ -226,8 +226,8 @@ SyncCacheConfig (
   UINT32                              i;\r
   EFI_PHYSICAL_ADDRESS                NextRegionBase;\r
   UINT64                              NextRegionLength;\r
-  UINT32                              NextSectionAttributes = 0;\r
-  UINT32                              SectionAttributes = 0;\r
+  UINT32                              NextSectionAttributes;\r
+  UINT32                              SectionAttributes;\r
   UINT64                              GcdAttributes;\r
   volatile ARM_FIRST_LEVEL_DESCRIPTOR   *FirstLevelTable;\r
   UINTN                               NumberOfDescriptors;\r