Reviewed-by: Michael Kinney <[email protected]>

Mike

> -----Original Message-----
> From: Leahy, Leroy P
> Sent: Wednesday, May 11, 2016 4:08 PM
> To: [email protected]; Leahy, Leroy P <[email protected]>; Kinney,
> Michael D <[email protected]>; Steele, Kelly <[email protected]>
> Subject: [PATCH 2/3] QuarkPlatformPkg: Fix variable set but not used build 
> errors
> 
> Fix variable set but not used errors detected by GCC 4.8.
> 
> Change-Id: I83634f88cfa89ea8afdfebbd0c7487f04e440693
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Lee Leahy <[email protected]>
> ---
>  QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c      | 14 
> +-------------
>  .../Library/PlatformHelperLib/PlatformHelperPei.c          |  2 --
>  QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c  |  5 -----
>  3 files changed, 1 insertion(+), 20 deletions(-)
> 
> diff --git a/QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c
> b/QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c
> index 8f5e6a3..a73b4c9 100644
> --- a/QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c
> +++ b/QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c
> @@ -79,7 +79,6 @@ PpmPatchFadtTable (
>    EFI_ACPI_TABLE_VERSION        Version;
>    UINTN                         Index;
>    UINTN                         Handle;
> -  EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE  *FadtPointer;
> 
>    //
>    // Scan all the acpi tables to find FADT 2.0
> @@ -106,9 +105,7 @@ PpmPatchFadtTable (
>    ASSERT (Table != NULL);
>    CopyMem (Table, CurrentTable, CurrentTable->Length);
> 
> -  FadtPointer = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE*) Table;
> -
> -    //
> +  //
>    // Update the ACPI table and recalculate checksum
>    //
>    Status = mAcpiTable->UninstallAcpiTable (mAcpiTable, Handle);
> @@ -322,7 +319,6 @@ PpmLoadAndPatchPMTables (
>    UINTN                         TableHandle;
>    UINT32                        FvStatus;
>    UINTN                         Size;
> -   EFI_ACPI_TABLE_VERSION       Version;
> 
>      Status = LocateSupportProtocol (&gEfiFirmwareVolume2ProtocolGuid,
> (VOID**)&FwVol, 1);
>      if (EFI_ERROR (Status)) {
> @@ -348,14 +344,6 @@ PpmLoadAndPatchPMTables (
>                        );
> 
>      if (!EFI_ERROR(Status)) {
> -        Version = EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 |
> EFI_ACPI_TABLE_VERSION_3_0;
> -
> -      if(((EFI_ACPI_DESCRIPTION_HEADER*) CurrentTable)->OemTableId == 
> SIGNATURE_64
> ('C', 'p', 'u', '0', 'I', 's', 't', 0)) {
> -          Version = EFI_ACPI_TABLE_VERSION_NONE;
> -      } else if(((EFI_ACPI_DESCRIPTION_HEADER*) CurrentTable)->OemTableId ==
> SIGNATURE_64 ('C', 'p', 'u', '1', 'I', 's', 't', 0)) {
> -          Version = EFI_ACPI_TABLE_VERSION_NONE;
> -      }
> -
>        SsdtTableUpdate ((EFI_ACPI_DESCRIPTION_HEADER *) CurrentTable);
> 
>        //
> diff --git a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperPei.c
> b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperPei.c
> index 50a0e42..9976862 100644
> --- a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperPei.c
> +++ b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperPei.c
> @@ -63,7 +63,6 @@ PlatformFindFvFileRawDataSection (
>    EFI_SECTION_TYPE                  SearchType;
>    EFI_FV_INFO                       VolumeInfo;
>    EFI_FV_FILE_INFO                  FileInfo;
> -  CONST EFI_PEI_SERVICES            **PeiServices;
> 
>    if (FileNameGuid == NULL || SectionData == NULL || SectionDataSize == 
> NULL) {
>      return EFI_INVALID_PARAMETER;
> @@ -71,7 +70,6 @@ PlatformFindFvFileRawDataSection (
>    *SectionData = NULL;
>    *SectionDataSize = 0;
> 
> -  PeiServices = GetPeiServicesTablePointer ();
>    SearchType = EFI_SECTION_RAW;
>    for (Instance = 0; !EFI_ERROR((PeiServicesFfsFindNextVolume (Instance,
> &VolumeHandle))); Instance++) {
>      if (FvNameGuid != NULL) {
> diff --git a/QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c
> b/QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c
> index 6cfe710..2185014 100644
> --- a/QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c
> +++ b/QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c
> @@ -590,9 +590,6 @@ Returns:
>  --*/
>  {
>    EFI_STATUS  Status;
> -  UINTN       NumBytes;
> -
> -  NumBytes = LbaLength;
> 
>    WriteAddress -= (PcdGet32 (PcdFlashAreaBaseAddress));
>    if (mInSmmMode == 0 ) { // !(EfiInManagementInterrupt ())) {
> @@ -1638,7 +1635,6 @@ Returns:
>    VOID                                *FirmwareVolumeHobList;
>    UINT32                              BufferSize;
>    EFI_FV_BLOCK_MAP_ENTRY              *PtrBlockMapEntry;
> -  UINTN                               LbaAddress;
>    BOOLEAN                             WriteEnabled;
>    BOOLEAN                             WriteLocked;
>    EFI_HANDLE                          FwbHandle;
> @@ -1882,7 +1878,6 @@ Returns:
>      FwhInstance->WriteEnabled             = WriteEnabled;
>      EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);
> 
> -    LbaAddress  = (UINTN) FwhInstance->FvWriteBase[0];
>      NumOfBlocks = 0;
>      WriteLocked = FALSE;
> 
> --
> 1.9.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to