summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2020-12-03 19:49:51 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-07 11:13:39 +0000
commit7aa9d75211fad45f6756b93fa2048b483deb0582 (patch)
treed0ed47548935abc542301ed17204c670f1d3c369 /StandaloneMmPkg
parent92df3ca8983576626e2e157475d34a07e6180253 (diff)
downloadedk2-7aa9d75211fad45f6756b93fa2048b483deb0582.tar.gz
edk2-7aa9d75211fad45f6756b93fa2048b483deb0582.tar.bz2
edk2-7aa9d75211fad45f6756b93fa2048b483deb0582.zip
StandaloneMmPkg: Fix ECC error 5007 in StandaloneMmCoreEntryPoint
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>
Diffstat (limited to 'StandaloneMmPkg')
-rw-r--r--StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c
index bf9650d546..57325c4a5f 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/SetPermissions.c
@@ -2,7 +2,7 @@
Locate, get and update PE/COFF permissions during Standalone MM
Foundation Entry point on ARM platforms.
-Copyright (c) 2017 - 2018, ARM Ltd. All rights reserved.<BR>
+Copyright (c) 2017 - 2021, Arm Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -121,9 +121,10 @@ LocateStandaloneMmCorePeCoffData (
IN OUT UINTN *TeDataSize
)
{
- EFI_FFS_FILE_HEADER *FileHeader = NULL;
+ EFI_FFS_FILE_HEADER *FileHeader;
EFI_STATUS Status;
+ FileHeader = NULL;
Status = FfsFindNextFile (
EFI_FV_FILETYPE_SECURITY_CORE,
BfvAddress,