From patchwork Thu May 7 06:16:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 48075 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 576AD21550 for ; Thu, 7 May 2015 06:17:20 +0000 (UTC) Received: by lbos2 with SMTP id s2sf9234837lbo.2 for ; Wed, 06 May 2015 23:17:19 -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:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=xenGetE4jpOZ2p/UNUTI2TJzWcrNzAlMu2ytfcfluNU=; b=FE65OJga0gYkEq4vloz6cqSuvRAqgNdvcJxnrLmVk/YKxV1+3RNd4k1PFK+xEbFZvA b1bCJTwLnDkX7EjAEJ14V2zExJxmta+4GPK8CZWb3U1/n0EEL1mX8fJSgFLHPfzqUCOB 4G7o7tCO+4bovvWsfB/Fg+DQpVbtmjQtCJFM6PmoDvxP2pueLba5+/ylr7Sf2z/P2lTy UHRhjj6/3awGp4kmmiiVkp3o4MkcdxIQaf59BRTMn1/xR6CJyHKBAWCGALOWVZrgwZCC AkJLK6wdJDI+qxDxLQF5qz5Pn7i2tZHTTUHGs43LAk3zBhuE7edbRAcOFe6xgR4m1g/p RO5w== X-Gm-Message-State: ALoCoQl8eRFbFRYYankYPU+TjgDU1OTcQMOKLj2GQpgXdwsc/ZbzLy6VbdqNv7ME+qiwaewE2Ny1 X-Received: by 10.112.171.41 with SMTP id ar9mr1326251lbc.24.1430979439344; Wed, 06 May 2015 23:17:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.198.229 with SMTP id jf5ls142555lac.56.gmail; Wed, 06 May 2015 23:17:19 -0700 (PDT) X-Received: by 10.112.139.1 with SMTP id qu1mr1807936lbb.8.1430979439194; Wed, 06 May 2015 23:17:19 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id w6si652334lbj.46.2015.05.06.23.17.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2015 23:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lagv1 with SMTP id v1so23161280lag.3 for ; Wed, 06 May 2015 23:17:19 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr1790064lbb.36.1430979439048; Wed, 06 May 2015 23:17:19 -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.67.65 with SMTP id l1csp3252159lbt; Wed, 6 May 2015 23:17:18 -0700 (PDT) X-Received: by 10.42.67.80 with SMTP id s16mr2033957ici.25.1430979435533; Wed, 06 May 2015 23:17:15 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id j12si1072520icc.29.2015.05.06.23.17.14 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 May 2015 23:17:15 -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-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YqF7E-0004e8-6a; Thu, 07 May 2015 06:17:00 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YqF7D-0004e0-Jc for edk2-devel@lists.sourceforge.net; Thu, 07 May 2015 06:16:59 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.177 as permitted sender) client-ip=209.85.212.177; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f177.google.com; Received: from mail-wi0-f177.google.com ([209.85.212.177]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YqF7C-0002LB-It for edk2-devel@lists.sourceforge.net; Thu, 07 May 2015 06:16:59 +0000 Received: by wief7 with SMTP id f7so5676677wie.0 for ; Wed, 06 May 2015 23:16:52 -0700 (PDT) X-Received: by 10.180.91.107 with SMTP id cd11mr3402974wib.51.1430979412541; Wed, 06 May 2015 23:16:52 -0700 (PDT) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id vy5sm1626296wjc.33.2015.05.06.23.16.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 May 2015 23:16:51 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, olivier.martin@arm.com Date: Thu, 7 May 2015 08:16:38 +0200 Message-Id: <1430979400-24189-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430979400-24189-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430979400-24189-1-git-send-email-ard.biesheuvel@linaro.org> 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 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YqF7C-0002LB-It Subject: [edk2] [PATCH v3 1/3] SecurityPkg: remove unused variables 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: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 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 This removes various unused variables from SecurityPkg whose presence is causing failed builds. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Chao Zhang Reviewed-by: Olivier Martin Signed-off-by: Ard Biesheuvel --- SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c | 5 ----- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c | 2 -- 2 files changed, 7 deletions(-) diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c index 1e9e1907c004..b48129135fd3 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c @@ -1255,7 +1255,6 @@ IsDeleteAuthVariable ( ) { BOOLEAN Del; - UINT8 *Payload; UINTN PayloadSize; Del = FALSE; @@ -1270,13 +1269,11 @@ IsDeleteAuthVariable ( (Attributes == Variable->CurrPtr->Attributes) && ((Attributes & (EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)) != 0)) { if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) { - Payload = (UINT8 *) Data + AUTHINFO2_SIZE (Data); PayloadSize = DataSize - AUTHINFO2_SIZE (Data); if (PayloadSize == 0) { Del = TRUE; } } else { - Payload = (UINT8 *) Data + AUTHINFO_SIZE; PayloadSize = DataSize - AUTHINFO_SIZE; if (PayloadSize == 0) { Del = TRUE; @@ -2179,7 +2176,6 @@ VerifyTimeBasedPayload ( UINT8 *Buffer; UINTN Length; UINT8 *SignerCerts; - UINT8 *WrapSigData; UINTN CertStackSize; UINT8 *CertsInCertDb; UINT32 CertsSizeinDb; @@ -2188,7 +2184,6 @@ VerifyTimeBasedPayload ( CertData = NULL; NewData = NULL; Attr = Attributes; - WrapSigData = NULL; SignerCerts = NULL; RootCert = NULL; CertsInCertDb = NULL; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c index b731865ed774..5ca013c92df2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c @@ -652,7 +652,6 @@ FindFileSystem ( { UINTN NoBlkIoHandles; UINTN NoSimpleFsHandles; - UINTN NoLoadFileHandles; EFI_HANDLE *BlkIoHandle; EFI_HANDLE *SimpleFsHandle; UINT16 *VolumeLabel; @@ -669,7 +668,6 @@ FindFileSystem ( NoSimpleFsHandles = 0; - NoLoadFileHandles = 0; OptionNumber = 0; InitializeListHead (&FsOptionMenu.Head);