]> git.proxmox.com Git - mirror_edk2.git/commitdiff
QuarkPlatformPkg: Fix variable set but not used build errors
authorLee Leahy <leroy.p.leahy@intel.com>
Wed, 11 May 2016 23:08:27 +0000 (16:08 -0700)
committerMichael Kinney <michael.d.kinney@intel.com>
Fri, 13 May 2016 18:34:32 +0000 (11:34 -0700)
Fix variable set but not used errors detected by GCC 4.8.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
QuarkPlatformPkg/Acpi/DxeSmm/SmmPowerManagement/Ppm.c
QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperPei.c
QuarkPlatformPkg/Platform/SpiFvbServices/FwBlockService.c

index 8f5e6a324cd296285b79287dafa55f7216bcca56..4fb9ca1c6ae67709ada56d99a8e02c79e0329c98 100644 (file)
@@ -2,7 +2,7 @@
 \r
 Processor power management initialization code.\r
 \r
-Copyright (c) 2013-2015 Intel Corporation.\r
+Copyright (c) 2013-2016 Intel Corporation.\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -79,7 +79,6 @@ PpmPatchFadtTable (
   EFI_ACPI_TABLE_VERSION        Version;\r
   UINTN                         Index;\r
   UINTN                         Handle;\r
-  EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE  *FadtPointer;\r
 \r
   //\r
   // Scan all the acpi tables to find FADT 2.0\r
@@ -106,9 +105,7 @@ PpmPatchFadtTable (
   ASSERT (Table != NULL);\r
   CopyMem (Table, CurrentTable, CurrentTable->Length);\r
 \r
-  FadtPointer = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE*) Table;\r
-\r
-    //\r
+  //\r
   // Update the ACPI table and recalculate checksum\r
   //\r
   Status = mAcpiTable->UninstallAcpiTable (mAcpiTable, Handle);\r
@@ -322,7 +319,6 @@ PpmLoadAndPatchPMTables (
   UINTN                         TableHandle;\r
   UINT32                        FvStatus;\r
   UINTN                         Size;\r
-   EFI_ACPI_TABLE_VERSION       Version;\r
 \r
     Status = LocateSupportProtocol (&gEfiFirmwareVolume2ProtocolGuid, (VOID**)&FwVol, 1);\r
     if (EFI_ERROR (Status)) {\r
@@ -348,14 +344,6 @@ PpmLoadAndPatchPMTables (
                       );\r
 \r
     if (!EFI_ERROR(Status)) {\r
-        Version = EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0;\r
-\r
-      if(((EFI_ACPI_DESCRIPTION_HEADER*) CurrentTable)->OemTableId == SIGNATURE_64 ('C', 'p', 'u', '0', 'I', 's', 't', 0)) {\r
-          Version = EFI_ACPI_TABLE_VERSION_NONE;\r
-      } else if(((EFI_ACPI_DESCRIPTION_HEADER*) CurrentTable)->OemTableId == SIGNATURE_64 ('C', 'p', 'u', '1', 'I', 's', 't', 0)) {\r
-          Version = EFI_ACPI_TABLE_VERSION_NONE;\r
-      }\r
-\r
       SsdtTableUpdate ((EFI_ACPI_DESCRIPTION_HEADER *) CurrentTable);\r
 \r
       //\r
index 50a0e427433a77e8fb60bd84569ede5b928aeaf0..c242c9ec950cd2aeba3e9900c99b0c45aeaf6158 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation of Helper routines for PEI enviroment.\r
 \r
-Copyright (c) 2013-2015 Intel Corporation.\r
+Copyright (c) 2013-2016 Intel Corporation.\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -63,7 +63,6 @@ PlatformFindFvFileRawDataSection (
   EFI_SECTION_TYPE                  SearchType;\r
   EFI_FV_INFO                       VolumeInfo;\r
   EFI_FV_FILE_INFO                  FileInfo;\r
-  CONST EFI_PEI_SERVICES            **PeiServices;\r
 \r
   if (FileNameGuid == NULL || SectionData == NULL || SectionDataSize == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -71,7 +70,6 @@ PlatformFindFvFileRawDataSection (
   *SectionData = NULL;\r
   *SectionDataSize = 0;\r
 \r
-  PeiServices = GetPeiServicesTablePointer ();\r
   SearchType = EFI_SECTION_RAW;\r
   for (Instance = 0; !EFI_ERROR((PeiServicesFfsFindNextVolume (Instance, &VolumeHandle))); Instance++) {\r
     if (FvNameGuid != NULL) {\r
index 6cfe71028ee5c89635cc3914dba953217dcee176..dbb5512f386ea400f8844a93b1233de57cd21fa0 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2013-2015 Intel Corporation.\r
+Copyright (c) 2013-2016 Intel Corporation.\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -590,9 +590,6 @@ Returns:
 --*/\r
 {\r
   EFI_STATUS  Status;\r
-  UINTN       NumBytes;\r
-\r
-  NumBytes = LbaLength;\r
 \r
   WriteAddress -= (PcdGet32 (PcdFlashAreaBaseAddress));\r
   if (mInSmmMode == 0 ) { // !(EfiInManagementInterrupt ())) {\r
@@ -1638,7 +1635,6 @@ Returns:
   VOID                                *FirmwareVolumeHobList;\r
   UINT32                              BufferSize;\r
   EFI_FV_BLOCK_MAP_ENTRY              *PtrBlockMapEntry;\r
-  UINTN                               LbaAddress;\r
   BOOLEAN                             WriteEnabled;\r
   BOOLEAN                             WriteLocked;\r
   EFI_HANDLE                          FwbHandle;\r
@@ -1882,7 +1878,6 @@ Returns:
     FwhInstance->WriteEnabled             = WriteEnabled;\r
     EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);\r
 \r
-    LbaAddress  = (UINTN) FwhInstance->FvWriteBase[0];\r
     NumOfBlocks = 0;\r
     WriteLocked = FALSE;\r
 \r