]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Fix Ecc error 5007 in ArmMmuLib
authorPierre Gondois <Pierre.Gondois@arm.com>
Thu, 10 Dec 2020 13:12:36 +0000 (13:12 +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/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c

index 34ba691d9da8e9a8c87f228a11b4b515a02c5bdc..940e4bc797f277bc1d6841c2f074b60f428171d2 100644 (file)
@@ -220,7 +220,7 @@ UpdateSectionEntries (
   IN UINT64                    Attributes\r
   )\r
 {\r
-  EFI_STATUS    Status = EFI_SUCCESS;\r
+  EFI_STATUS    Status;\r
   UINT32        EntryMask;\r
   UINT32        EntryValue;\r
   UINT32        FirstLevelIdx;\r
@@ -231,6 +231,8 @@ UpdateSectionEntries (
   VOID          *Mva;\r
   volatile ARM_FIRST_LEVEL_DESCRIPTOR   *FirstLevelTable;\r
 \r
+  Status = EFI_SUCCESS;\r
+\r
   // EntryMask: bitmask of values to change (1 = change this value, 0 = leave alone)\r
   // EntryValue: values at bit positions specified by EntryMask\r
 \r