]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCoreEntryPoint
authorSami Mujawar <sami.mujawar@arm.com>
Thu, 3 Dec 2020 19:49:51 +0000 (19:49 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 7 Jan 2021 11:13:39 +0000 (11:13 +0000)
Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150)

Fix ECC error "[5007] There should be no initialization of a variable
as part of its declaration Variable."

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c

index bf9650d546291f6d449249d4f0577278a93adb24..57325c4a5fe38398b6ddc3a8658305f696fe6dc1 100644 (file)
@@ -2,7 +2,7 @@
   Locate, get and update PE/COFF permissions during Standalone MM\r
   Foundation Entry point on ARM platforms.\r
 \r
-Copyright (c) 2017 - 2018, ARM Ltd. All rights reserved.<BR>\r
+Copyright (c) 2017 - 2021, Arm Ltd. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -121,9 +121,10 @@ LocateStandaloneMmCorePeCoffData (
   IN  OUT   UINTN                           *TeDataSize\r
   )\r
 {\r
-  EFI_FFS_FILE_HEADER             *FileHeader = NULL;\r
+  EFI_FFS_FILE_HEADER             *FileHeader;\r
   EFI_STATUS                      Status;\r
 \r
+  FileHeader = NULL;\r
   Status = FfsFindNextFile (\r
              EFI_FV_FILETYPE_SECURITY_CORE,\r
              BfvAddress,\r