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

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