diff mbox

[edk2] ShellPkg: Fixed variable set but never used

Message ID 1414670092-1069-1-git-send-email-olivier.martin@arm.com
State New
Headers show

Commit Message

Olivier Martin Oct. 30, 2014, 11:54 a.m. UTC
This warning/error raised by ARM toolchain prevents to build
the EFI Shell for ARM 32-bit with this toolchain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
---
 ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Olivier Martin Oct. 30, 2014, 2:30 p.m. UTC | #1
Sorry, I have just realized I sent the patch to the wrong maintainer.

> -----Original Message-----
> From: Olivier Martin [mailto:olivier.martin@arm.com]
> Sent: 30 October 2014 11:55
> To: daryl.mcdaniel@intel.com
> Cc: edk2-devel@lists.sourceforge.net; Olivier Martin
> Subject: [PATCH] ShellPkg: Fixed variable set but never used
> 
> This warning/error raised by ARM toolchain prevents to build
> the EFI Shell for ARM 32-bit with this toolchain.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Olivier Martin <olivier.martin@arm.com>
> ---
>  ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> index b4cf682..4921f28 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> @@ -898,7 +898,6 @@ AddNewGuidNameMapping(
>    IN CONST CHAR8    *Lang OPTIONAL
>    )
>  {
> -  CONST GUID_INFO_BLOCK *Temp;
>    EFI_STRING_ID         NameID;
> 
>    HandleParsingHiiInit();
> @@ -907,7 +906,7 @@ AddNewGuidNameMapping(
>      return (EFI_INVALID_PARAMETER);
>    }
> 
> -  if ((Temp = InternalShellGetNodeFromGuid(Guid)) != NULL) {
> +  if ((InternalShellGetNodeFromGuid(Guid)) != NULL) {
>      return (EFI_ACCESS_DENIED);
>    }
> 
> --
> 2.1.1





------------------------------------------------------------------------------
Carsey, Jaben Oct. 30, 2014, 2:31 p.m. UTC | #2
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

(I had noticed it anyways)

-----Original Message-----
From: Olivier Martin [mailto:olivier.martin@arm.com] 
Sent: Thursday, October 30, 2014 7:30 AM
To: Carsey, Jaben
Cc: edk2-devel@lists.sourceforge.net; Mcdaniel, Daryl
Subject: RE: [PATCH] ShellPkg: Fixed variable set but never used
Importance: High

Sorry, I have just realized I sent the patch to the wrong maintainer.

> -----Original Message-----
> From: Olivier Martin [mailto:olivier.martin@arm.com]
> Sent: 30 October 2014 11:55
> To: daryl.mcdaniel@intel.com
> Cc: edk2-devel@lists.sourceforge.net; Olivier Martin
> Subject: [PATCH] ShellPkg: Fixed variable set but never used
> 
> This warning/error raised by ARM toolchain prevents to build
> the EFI Shell for ARM 32-bit with this toolchain.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Olivier Martin <olivier.martin@arm.com>
> ---
>  ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> index b4cf682..4921f28 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> @@ -898,7 +898,6 @@ AddNewGuidNameMapping(
>    IN CONST CHAR8    *Lang OPTIONAL
>    )
>  {
> -  CONST GUID_INFO_BLOCK *Temp;
>    EFI_STRING_ID         NameID;
> 
>    HandleParsingHiiInit();
> @@ -907,7 +906,7 @@ AddNewGuidNameMapping(
>      return (EFI_INVALID_PARAMETER);
>    }
> 
> -  if ((Temp = InternalShellGetNodeFromGuid(Guid)) != NULL) {
> +  if ((InternalShellGetNodeFromGuid(Guid)) != NULL) {
>      return (EFI_ACCESS_DENIED);
>    }
> 
> --
> 2.1.1





------------------------------------------------------------------------------
diff mbox

Patch

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index b4cf682..4921f28 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -898,7 +898,6 @@  AddNewGuidNameMapping(
   IN CONST CHAR8    *Lang OPTIONAL
   )
 {
-  CONST GUID_INFO_BLOCK *Temp;
   EFI_STRING_ID         NameID;
 
   HandleParsingHiiInit();
@@ -907,7 +906,7 @@  AddNewGuidNameMapping(
     return (EFI_INVALID_PARAMETER);
   }
 
-  if ((Temp = InternalShellGetNodeFromGuid(Guid)) != NULL) {
+  if ((InternalShellGetNodeFromGuid(Guid)) != NULL) {
     return (EFI_ACCESS_DENIED);
   }