ArmPkg: Fix Ecc error 5007 in SemihostLib

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>
This commit is contained in:
Pierre Gondois 2020-12-10 13:14:07 +00:00 committed by mergify[bot]
parent 02c621f3f7
commit 58bba221b7
1 changed files with 2 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Copyright (c) 2013 - 2014, ARM Ltd. All rights reserved.<BR> Copyright (c) 2013 - 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -135,9 +135,7 @@ SemihostFileClose (
IN UINTN FileHandle IN UINTN FileHandle
) )
{ {
INT32 Result = Semihost_SYS_CLOSE(&FileHandle); if (Semihost_SYS_CLOSE (&FileHandle) == -1) {
if (Result == -1) {
return RETURN_INVALID_PARAMETER; return RETURN_INVALID_PARAMETER;
} else { } else {
return RETURN_SUCCESS; return RETURN_SUCCESS;