diff mbox

[edk2,03/35] EdkCompatibilityPkg: UefiEfiIfrSupportLib: remove set but not used variables

Message ID 1458815844-24793-4-git-send-email-lersek@redhat.com
State Accepted
Commit 5ccd43c817af5e77ce5b287d84959a033fdef533
Headers show

Commit Message

Laszlo Ersek March 24, 2016, 10:36 a.m. UTC
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c         | 4 ----
 EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c           | 4 ----
 EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c | 2 --
 3 files changed, 10 deletions(-)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
index 3f5243387d35..341930ae9a01 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
@@ -522,7 +522,6 @@  Returns:
   EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;
   EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;
   UINT8                        *Package;
-  UINT8                        *FormSet;
   UINT8                        *OpCodeData;
   UINT32                       Offset;
   UINT32                       Offset2;
@@ -572,7 +571,6 @@  Returns:
   //
   Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
   Offset2 = 0;
-  FormSet = NULL;
   EfiCopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
 
   while (Offset < PackageListLength) {
@@ -660,7 +658,6 @@  Returns:
   EFI_HII_DATABASE_PROTOCOL    *HiiDatabase;
   EFI_HII_PACKAGE_LIST_HEADER  *HiiPackageList;
   UINT8                        *Package;
-  UINT8                        *FormSet;
   UINT8                        *OpCodeData;
   UINT32                       Offset;
   UINT32                       Offset2;
@@ -709,7 +706,6 @@  Returns:
   //
   Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
   Offset2 = 0;
-  FormSet = NULL;
   EfiCopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
 
   while (Offset < PackageListLength) {
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
index 1452ef003504..864a850d4a79 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
@@ -452,9 +452,7 @@  Returns:
   UINTN                         Index;
   UINTN                         Count;
   UINTN                         Start;
-  UINTN                         End;
   UINTN                         Top;
-  UINTN                         Bottom;
   CHAR16                        *StringPtr;
   UINTN                         LeftColumn;
   UINTN                         RightColumn;
@@ -529,10 +527,8 @@  Returns:
   // each end plus a border.
   //
   Start     = (DimensionsWidth - LargestString - 2) / 2 + LeftColumn + 1;
-  End       = Start + LargestString + 1;
 
   Top       = ((DimensionsHeight - NumberOfLines - 2) / 2) + TopRow - 1;
-  Bottom    = Top + NumberOfLines + 2;
 
   //
   // Disable cursor
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c
index 2c454de95178..f96f3a2ea2bc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrOpCodeCreation.c
@@ -485,7 +485,6 @@  CreateNumericOpCode (
   IN OUT EFI_HII_UPDATE_DATA *Data
   )
 {
-  UINTN                       Length;
   EFI_STATUS                  Status;
   EFI_IFR_NUMERIC             Numeric;
   MINMAXSTEP_DATA             MinMaxStep;
@@ -498,7 +497,6 @@  CreateNumericOpCode (
     return EFI_INVALID_PARAMETER;
   }
 
-  Length = sizeof (EFI_IFR_NUMERIC) + sizeof (EFI_IFR_DEFAULT) + sizeof (EFI_IFR_END);
   if (Data->Offset + sizeof (EFI_IFR_CHECKBOX) > Data->BufferSize) {
     return EFI_BUFFER_TOO_SMALL;
   }