From patchwork Thu Apr 23 12:52:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47455 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 418062121F for ; Thu, 23 Apr 2015 12:52:47 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf19085321wic.3 for ; Thu, 23 Apr 2015 05:52:46 -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=ommPf8f8MH94GJjaQQ08MLaHQubrW32jALz9ptLXnhE=; b=mlcEJom/um3ABH934dmSppR5i0F9+H9egn4ut9Kjh/PmvXvIg5fi7ytyJjiANN+BzT /bVyg9HekWO3G0CDoJp8qZkQ7sebSDd/QHRl7sHeYVKFsFDRd+L/Z3xiHmE5SdJw57Mj xwatHx4zZCMTw4iT4CHZBKcUkQ262f8FGwyYlkN3OqVa2TQDpqpG+rMY/aAnpBjjAitO X04TAeJxuHRnsgM5qz+9wNnIvcKGpEhmeVx4CO/nxNlgWdhjsxfj/5+4i2wLmilSvzuR 8lCJCFsTVdPt5PD5U/j+euNucWepTpu4RQe7Dcx2p9BV3u00MDx6OLLo5RWm7+hBZNNX c+Lw== X-Gm-Message-State: ALoCoQnrCVfXSoSsCgTlZ7/hptq+m780ylKxkMAkn2nLhvPYKEvqBe+lNMWRI4hFQkhTlHZN+pBD X-Received: by 10.152.88.73 with SMTP id be9mr1352179lab.2.1429793566518; Thu, 23 Apr 2015 05:52:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.38 with SMTP id jt6ls365951lab.101.gmail; Thu, 23 Apr 2015 05:52:46 -0700 (PDT) X-Received: by 10.152.243.9 with SMTP id wu9mr2282130lac.63.1429793566375; Thu, 23 Apr 2015 05:52:46 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id ao1si5912004lbd.172.2015.04.23.05.52.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 05:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by laat2 with SMTP id t2so11855521laa.1 for ; Thu, 23 Apr 2015 05:52:46 -0700 (PDT) X-Received: by 10.152.27.98 with SMTP id s2mr2351176lag.106.1429793565933; Thu, 23 Apr 2015 05:52:45 -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 l1csp552491lbt; Thu, 23 Apr 2015 05:52:45 -0700 (PDT) X-Received: by 10.50.62.148 with SMTP id y20mr11403670igr.17.1429793564308; Thu, 23 Apr 2015 05:52:44 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id m18si6710229ioe.9.2015.04.23.05.52.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 05:52:44 -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-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YlGcL-0007ZK-9G; Thu, 23 Apr 2015 12:52:33 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YlGcK-0007ZF-BV for edk2-devel@lists.sourceforge.net; Thu, 23 Apr 2015 12:52:32 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.175 as permitted sender) client-ip=209.85.212.175; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f175.google.com; Received: from mail-wi0-f175.google.com ([209.85.212.175]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YlGcJ-00068y-HE for edk2-devel@lists.sourceforge.net; Thu, 23 Apr 2015 12:52:32 +0000 Received: by widdi4 with SMTP id di4so91289420wid.0 for ; Thu, 23 Apr 2015 05:52:25 -0700 (PDT) X-Received: by 10.194.91.129 with SMTP id ce1mr5237090wjb.53.1429793545536; Thu, 23 Apr 2015 05:52:25 -0700 (PDT) Received: from ards-macbook-pro.local ([84.78.25.77]) by mx.google.com with ESMTPSA id z12sm12018090wjw.39.2015.04.23.05.52.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Apr 2015 05:52:24 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com Date: Thu, 23 Apr 2015 14:52:03 +0200 Message-Id: <1429793525-28290-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1429793525-28290-1-git-send-email-ard.biesheuvel@linaro.org> References: <1429793525-28290-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 X-Headers-End: 1YlGcJ-00068y-HE Subject: [edk2] [PATCH 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.53 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 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);