From patchwork Fri Sep 19 22:56:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Martin X-Patchwork-Id: 37657 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C37D820293 for ; Fri, 19 Sep 2014 23:00:51 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf2020120lbd.11 for ; Fri, 19 Sep 2014 16:00:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:thread-topic :thread-index:message-id:accept-language:acceptlanguage:mime-version :cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-language:content-type; bh=xVJS7pJFuEUatlrZRZEo8ED7cDoIHx/o4tWkSVSGyC8=; b=IRq7gc1jyQcB3/5kDSrv8XKYGCLyvIAJcaHA6wkkSyHJcjnqMydvmmNGG+/Q+AWaBN 3Lmw8D1a6F99gJX6mqp5z3A+JK7cF3KM2AvRWE+PJ4whLdTD71T1JEoNHRvOaghvkyvV aPXBbcyuuLtVdoocEvv7FL6iXpwUr7QApSGkaYliXQdO+de7ghQPj3OZOblFrE4QE8+P H1qF4GuruPtHsJCffwU7UZSy9wc3SmLcmHOdkgqFEYtgm7EOR4tiqd5bdD7LHJFctML3 WCLLnfl3IPTQp8jmnsnEvMEYnloGNio8yrfMGaGScsCFQQKVVen86V7z7FLzmtFB7rRY 3wBA== X-Gm-Message-State: ALoCoQloISG7+cZ42h4uWLwE9CBmrm7WWyBj0TJCQV8+WyhYaPTUFsyLXfOA8fGm5PdC+6BxCb7+ X-Received: by 10.152.6.9 with SMTP id w9mr15630law.7.1411167649953; Fri, 19 Sep 2014 16:00:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.225 with SMTP id xv1ls372486lab.43.gmail; Fri, 19 Sep 2014 16:00:49 -0700 (PDT) X-Received: by 10.152.115.195 with SMTP id jq3mr9693468lab.90.1411167649724; Fri, 19 Sep 2014 16:00:49 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178]) by mx.google.com with ESMTPS id o17si4390485laa.10.2014.09.19.16.00.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 19 Sep 2014 16:00:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id z12so1429040lbi.37 for ; Fri, 19 Sep 2014 16:00:49 -0700 (PDT) X-Received: by 10.112.144.228 with SMTP id sp4mr9396103lbb.54.1411167649562; Fri, 19 Sep 2014 16:00:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp1020467lbb; Fri, 19 Sep 2014 16:00:48 -0700 (PDT) X-Received: by 10.43.128.7 with SMTP id hc7mr3873581icc.63.1411167647410; Fri, 19 Sep 2014 16:00:47 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id h5si2929725igt.58.2014.09.19.16.00.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 19 Sep 2014 16:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XV7AG-0000tl-UW; Fri, 19 Sep 2014 23:00:33 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XV7AE-0000tg-RB for edk2-devel@lists.sourceforge.net; Fri, 19 Sep 2014 23:00:30 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of arm.com designates 195.130.217.12 as permitted sender) client-ip=195.130.217.12; envelope-from=olivier.martin@arm.com; helo=service88.mimecast.com; Received: from service88.mimecast.com ([195.130.217.12]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1XV7AD-00014z-A1 for edk2-devel@lists.sourceforge.net; Fri, 19 Sep 2014 23:00:30 +0000 Received: from EMEA-CAM-GW3.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) (Using TLS) by service88.mimecast.com; Sat, 20 Sep 2014 00:00:21 +0100 Received: from george.Emea.Arm.com ([fe80::4c19:a8f:5c9a:76df]) by EMEA-CAM-GW3.Emea.Arm.com ([::1]) with mapi; Sat, 20 Sep 2014 00:00:19 +0100 From: Olivier Martin To: "feng.tian@intel.com" Date: Fri, 19 Sep 2014 23:56:53 +0100 Thread-Topic: [PATCH] MdeModulePkg/Universal: Fixed unused assigned variable Thread-Index: AQHP1F1ORfL55jlfH0CmV+5+43BPOg== Message-ID: <0877601216922E4B83A7129715B5DA2BBE7474DF30@GEORGE.Emea.Arm.com> Accept-Language: en-US, en-GB X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB MIME-Version: 1.0 X-MC-Unique: 114092000002200202 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1XV7AD-00014z-A1 Cc: "edk2-devel@lists.sourceforge.net" Subject: [edk2] [PATCH] MdeModulePkg/Universal: Fixed unused assigned variable X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: olivier.martin@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Language: en-GB Dear MdeModulePkg maintainer, please review my attached patch that removes some unused assigned variables. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin Best Regards, Olivier -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk >From 32fffe05a8dee86da2d13c7278ddcec72e027d6c Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Fri, 19 Sep 2014 22:18:53 +0100 Subject: MdeModulePkg/Universal: Fixed unused assigned variable Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- .../CustomizedDisplayLib/CustomizedDisplayLib.c | 2 -- .../Universal/DisplayEngineDxe/FormDisplay.c | 10 ---------- .../Universal/DisplayEngineDxe/InputHandler.c | 8 ++------ .../Universal/DisplayEngineDxe/ProcessOptions.c | 2 -- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 9 +-------- 5 files changed, 3 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c index 92f3a43..f442f7d 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c @@ -135,7 +135,6 @@ RefreshKeyHelp ( { UINTN SecCol; UINTN ThdCol; - UINTN LeftColumnOfHelp; UINTN RightColumnOfHelp; UINTN TopRowOfHelp; UINTN BottomRowOfHelp; @@ -166,7 +165,6 @@ RefreshKeyHelp ( ThdCol = gScreenDimensions.LeftColumn + (gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn) / 3 * 2; StartColumnOfHelp = gScreenDimensions.LeftColumn + 2; - LeftColumnOfHelp = gScreenDimensions.LeftColumn + 1; RightColumnOfHelp = gScreenDimensions.RightColumn - 1; TopRowOfHelp = gScreenDimensions.BottomRow - STATUS_BAR_HEIGHT - gFooterHeight + 1; BottomRowOfHelp = gScreenDimensions.BottomRow - STATUS_BAR_HEIGHT - 2; diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 0db450e..4be8a96 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -2049,10 +2049,8 @@ UiDisplayMenu ( UINTN TopRow; UINTN BottomRow; UINTN Index; - UINT16 Width; CHAR16 *StringPtr; CHAR16 *OptionString; - CHAR16 *OutputString; CHAR16 *HelpString; CHAR16 *HelpHeaderString; CHAR16 *HelpBottomString; @@ -2069,10 +2067,8 @@ UiDisplayMenu ( UI_MENU_OPTION *MenuOption; UI_MENU_OPTION *NextMenuOption; UI_MENU_OPTION *SavedMenuOption; - UI_MENU_OPTION *PreviousMenuOption; UI_CONTROL_FLAG ControlFlag; UI_SCREEN_OPERATION ScreenOperation; - UINT16 DefaultId; FORM_DISPLAY_ENGINE_STATEMENT *Statement; BROWSER_HOT_KEY *HotKey; UINTN HelpPageIndex; @@ -2087,7 +2083,6 @@ UiDisplayMenu ( UINT16 BottomLineWidth; EFI_STRING_ID HelpInfo; UI_EVENT_TYPE EventType; - FORM_DISPLAY_ENGINE_STATEMENT *InitialHighlight; BOOLEAN SkipHighLight; EventType = UIEventNone; @@ -2098,7 +2093,6 @@ UiDisplayMenu ( OptionString = NULL; ScreenOperation = UiNoOperation; NewLine = TRUE; - DefaultId = 0; HelpPageCount = 0; HelpLine = 0; RowCount = 0; @@ -2109,24 +2103,20 @@ UiDisplayMenu ( EachLineWidth = 0; HeaderLineWidth = 0; BottomLineWidth = 0; - OutputString = NULL; UpArrow = FALSE; DownArrow = FALSE; SkipValue = 0; SkipHighLight = FALSE; NextMenuOption = NULL; - PreviousMenuOption = NULL; SavedMenuOption = NULL; HotKey = NULL; Repaint = TRUE; MenuOption = NULL; gModalSkipColumn = (CHAR16) (gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn) / 6; - InitialHighlight = gFormData->HighLightedStatement; ZeroMem (&Key, sizeof (EFI_INPUT_KEY)); - Width = (UINT16)gOptionBlockWidth - 1; TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT; BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT - 1; diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c index 78dd104..f76937a 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c @@ -439,7 +439,6 @@ GetNumericInput ( IN UI_MENU_OPTION *MenuOption ) { - EFI_STATUS Status; UINTN Column; UINTN Row; CHAR16 InputText[MAX_NUMERIC_INPUT_WIDTH]; @@ -685,7 +684,7 @@ GetNumericInput ( goto TheKey2; } - Status = WaitForKeyStroke (&Key); + WaitForKeyStroke (&Key); TheKey2: switch (Key.UnicodeChar) { @@ -1118,7 +1117,6 @@ GetSelectionInputPopUp ( IN UI_MENU_OPTION *MenuOption ) { - EFI_STATUS Status; EFI_INPUT_KEY Key; UINTN Index; CHAR16 *StringPtr; @@ -1351,7 +1349,7 @@ GetSelectionInputPopUp ( goto TheKey; } - Status = WaitForKeyStroke (&Key); + WaitForKeyStroke (&Key); TheKey: switch (Key.UnicodeChar) { @@ -1505,7 +1503,6 @@ TheKey: } else { gUserInput->InputValue.Buffer = ReturnValue; gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen; - Status = EFI_SUCCESS; } } else { ASSERT (CurrentOption != NULL); @@ -1514,7 +1511,6 @@ TheKey: return EFI_DEVICE_ERROR; } else { SetValuesByType (&gUserInput->InputValue.Value, &CurrentOption->OptionOpCode->Value, gUserInput->InputValue.Type); - Status = EFI_SUCCESS; } } diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index 65d2a74..6e9e6dd 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -955,7 +955,6 @@ ProcessOptions ( UINTN Index2; UINT8 *ValueArray; UINT8 ValueType; - EFI_STRING_ID StringId; EFI_IFR_ORDERED_LIST *OrderList; BOOLEAN ValueInvalid; @@ -964,7 +963,6 @@ ProcessOptions ( StringPtr = NULL; Character[1] = L'\0'; *OptionString = NULL; - StringId = 0; ValueInvalid = FALSE; ZeroMem (FormattedNumber, 21 * sizeof (CHAR16)); diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 2b09593..b4fd878 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -836,13 +836,11 @@ FormDisplayCallback ( IN VOID *Context ) { - EFI_STATUS Status; - if (mFormDisplay != NULL) { return; } - Status = gBS->LocateProtocol ( + gBS->LocateProtocol ( &gEdkiiFormDisplayEngineProtocolGuid, NULL, (VOID **) &mFormDisplay @@ -3205,7 +3203,6 @@ SubmitForSystem ( EFI_STATUS Status; LIST_ENTRY *Link; LIST_ENTRY *StorageLink; - BROWSER_STORAGE *Storage; FORMSET_STORAGE *FormSetStorage; FORM_BROWSER_FORM *Form; FORM_BROWSER_FORMSET *LocalFormSet; @@ -3271,7 +3268,6 @@ SubmitForSystem ( StorageLink = GetFirstNode (&LocalFormSet->StorageListHead); while (!IsNull (&LocalFormSet->StorageListHead, StorageLink)) { FormSetStorage = FORMSET_STORAGE_FROM_LINK (StorageLink); - Storage = FormSetStorage->BrowserStorage; StorageLink = GetNextNode (&LocalFormSet->StorageListHead, StorageLink); SynchronizeStorage(FormSetStorage->BrowserStorage, FormSetStorage->ConfigRequest, FALSE); @@ -3280,7 +3276,6 @@ SubmitForSystem ( StorageLink = GetFirstNode (&LocalFormSet->SaveFailStorageListHead); while (!IsNull (&LocalFormSet->SaveFailStorageListHead, StorageLink)) { FormSetStorage = FORMSET_STORAGE_FROM_SAVE_FAIL_LINK (StorageLink); - Storage = FormSetStorage->BrowserStorage; StorageLink = GetNextNode (&LocalFormSet->SaveFailStorageListHead, StorageLink); SynchronizeStorage(FormSetStorage->BrowserStorage, FormSetStorage->ConfigRequest, FALSE); @@ -4601,13 +4596,11 @@ ConfigRequestAdjust ( CHAR16 *RequestElement; CHAR16 *NextRequestElement; CHAR16 *NextElementBakup; - UINTN SpareBufLen; CHAR16 *SearchKey; CHAR16 *ValueKey; BOOLEAN RetVal; CHAR16 *ConfigRequest; - SpareBufLen = 0; RetVal = FALSE; NextElementBakup = NULL; ValueKey = NULL; -- 1.7.5.4