From patchwork Mon May 4 09:14:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 47996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5F212121F for ; Mon, 4 May 2015 09:14:44 +0000 (UTC) Received: by wgin8 with SMTP id n8sf42563680wgi.0 for ; Mon, 04 May 2015 02:14:44 -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=JE0UfHoZeKqSAaGwJiEqVjm3ykjtdlBef/GghwL/MLKfYpC9SEl6/Ybea6ggDaNShn 7h1AOSGwY/t1KwfR24J93+EiL8EL6swBfjJGhiKfsyDG3lg1ZlKozPhzA4c3rGEUeYTO 2tnp6wgkFh+XvEvVdeOpU8t7gDu9aKeLHgxD34fTO9Rrk2tQpKCZHYhi0p0WGFtpGDRa 5FRBdvoCAIKgrqvvxlt+kOMGAzOc7xwYmJZGrDBqRbzlMCH2LxEnZbTQBUh/r+KwBwBs ewUxq0xPOzB/XiKWCfwAQWham6EjBKQ+sIIw7WM2kumBv6KXwZ1Qcw+Tcn9Wn68rPbbb pduA== X-Gm-Message-State: ALoCoQkwGBk4qcM3v2A3Avg1WexNWajbZ5qJLCMvuBRet3Fjvg0kjp1J78MPHEe00I0su7+KeymL X-Received: by 10.194.249.1 with SMTP id yq1mr17914876wjc.2.1430730884165; Mon, 04 May 2015 02:14:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.37 with SMTP id w5ls675452laa.77.gmail; Mon, 04 May 2015 02:14:44 -0700 (PDT) X-Received: by 10.112.159.9 with SMTP id wy9mr18338313lbb.120.1430730884003; Mon, 04 May 2015 02:14:44 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id xr5si9684203lbb.76.2015.05.04.02.14.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2015 02:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbcga7 with SMTP id ga7so100581324lbc.1 for ; Mon, 04 May 2015 02:14:43 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr18392095lbb.76.1430730883722; Mon, 04 May 2015 02:14:43 -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 l1csp1548176lbt; Mon, 4 May 2015 02:14:42 -0700 (PDT) X-Received: by 10.42.43.199 with SMTP id y7mr7544542ice.12.1430730881957; Mon, 04 May 2015 02:14:41 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id k4si4607246igx.41.2015.05.04.02.14.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 May 2015 02:14:41 -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 1YpCSO-0001Fl-7d; Mon, 04 May 2015 09:14:32 +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 1YpCSN-0001Fa-6i for edk2-devel@lists.sourceforge.net; Mon, 04 May 2015 09:14:31 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.171 as permitted sender) client-ip=209.85.212.171; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f171.google.com; Received: from mail-wi0-f171.google.com ([209.85.212.171]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YpCSL-0001x4-BH for edk2-devel@lists.sourceforge.net; Mon, 04 May 2015 09:14:31 +0000 Received: by widdi4 with SMTP id di4so103173117wid.0 for ; Mon, 04 May 2015 02:14:23 -0700 (PDT) X-Received: by 10.180.83.195 with SMTP id s3mr18281234wiy.52.1430730863355; Mon, 04 May 2015 02:14:23 -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 z12sm19621767wjw.39.2015.05.04.02.14.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 May 2015 02:14:22 -0700 (PDT) From: Ard Biesheuvel To: olivier.martin@arm.com, lersek@redhat.com, edk2-devel@lists.sourceforge.net Date: Mon, 4 May 2015 11:14:06 +0200 Message-Id: <1430730848-5099-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430730848-5099-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430730848-5099-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: 1YpCSL-0001x4-BH Subject: [edk2] [PATCH v2 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.217.172 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);