From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A3DA01A1E48 for ; Thu, 28 Jul 2016 20:26:16 -0700 (PDT) Received: from GaryWorkstation.apac.novell.com (ip-203-192-156-9.asianetcom.net [203.192.156.9]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Fri, 29 Jul 2016 05:26:12 +0200 From: Gary Lin To: edk2-devel@lists.01.org Cc: David Wei , "Wu, Hao A" , "Lu, ShifeiX A" Date: Fri, 29 Jul 2016 11:25:27 +0800 Message-Id: <20160729032538.17730-9-glin@suse.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160729032538.17730-1-glin@suse.com> References: <20160729032538.17730-1-glin@suse.com> MIME-Version: 1.0 Subject: [PATCH v2 08/19] Vlv2TbltDevicePkg/AcpiPlatform: Remove unused variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 03:26:17 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following errors from gcc: Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c: In function 'PlatformUpdateTables': Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c:236:63: warning: variable 'LocalApicCounter' set but not used [-Wunused-but-set-variable] Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c:214:64: warning: variable 'ProcessorLocalApicEntry' set but not used [-Wunused-but-set-variable] Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c:213:63: warning: variable 'BufferSize' set but not used [-Wunused-but-set-variable] Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c: In function 'AcpiPlatformEntryPoint': Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c:797:33: warning: variable 'Data32' set but not used [-Wunused-but-set-variable] Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c: In function ‘PatchGv3SsdtTable’: Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c:243:31: error: variable ‘Status’ set but not used [-Werror=unused-but-set-variable] Cc: David Wei Cc: "Wu, Hao A" Cc: "Lu, ShifeiX A" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin Reviewed-by: David Wei --- Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 8 -------- Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 691a9d1..bb9cee5 100644 --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -210,8 +210,6 @@ PlatformUpdateTables ( EFI_MP_SERVICES_PROTOCOL *MpService; UINTN MaximumNumberOfCPUs; UINTN NumberOfEnabledCPUs; - UINTN BufferSize; - ACPI_APIC_STRUCTURE_PTR *ProcessorLocalApicEntry; UINTN BspIndex; EFI_ACPI_1_0_ASF_DESCRIPTION_TABLE *AsfEntry; EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER *HpetTbl; @@ -233,7 +231,6 @@ PlatformUpdateTables ( UINT16 NumberOfHpets; UINT16 HpetCapIdValue; UINT32 HpetBlockID; - UINTN LocalApicCounter; EFI_PROCESSOR_INFORMATION ProcessorInfoBuffer; UINT8 TempVal; EFI_ACPI_3_0_IO_APIC_STRUCTURE *IOApicType; @@ -242,9 +239,7 @@ PlatformUpdateTables ( CurrPtr = NULL; EndPtr = NULL; ApicPtr = NULL; - LocalApicCounter = 0; CurrProcessor = 0; - ProcessorLocalApicEntry = NULL; if (Table->Signature != EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) { @@ -372,7 +367,6 @@ PlatformUpdateTables ( ApicPtr->AcpiLocalApic.AcpiProcessorId = (UINT8)MaximumNumberOfCPUs; } - BufferSize = 0; ApicPtr->AcpiLocalApic.Flags = 0; for (CurrProcessor = 0; CurrProcessor < MaximumNumberOfCPUs; CurrProcessor++) { @@ -797,7 +791,6 @@ AcpiPlatformEntryPoint ( EFI_MP_SERVICES_PROTOCOL *MpService; UINTN MaximumNumberOfCPUs; UINTN NumberOfEnabledCPUs; - UINT32 Data32; PCH_STEPPING pchStepping; UINT32 DxeGpioValue; @@ -807,7 +800,6 @@ AcpiPlatformEntryPoint ( Instance = 0; CurrentTable = NULL; TableHandle = 0; - Data32 = 0; // // Update HOB variable for PCI resource information. diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c index 3489650..c89c07f 100644 --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.c @@ -232,7 +232,6 @@ PatchGv3SsdtTable ( IN OUT EFI_ACPI_DESCRIPTION_HEADER *TableHeader ) { - EFI_STATUS Status; UINT8 *CurrPtr; UINT8 *SsdtPointer; UINT32 Signature; @@ -328,7 +327,7 @@ PatchGv3SsdtTable ( continue; } - Status = EistProt->GetEistTable (EistProt, &EistInfo, (VOID **) &PssState); + EistProt->GetEistTable (EistProt, &EistInfo, (VOID **) &PssState); AdjustSize = PssTable->NumEntries * sizeof (EFI_PSS_PACKAGE); AdjustSize -= EistInfo->NumStates * sizeof (EFI_PSS_PACKAGE); -- 2.9.2