From patchwork Thu Mar 17 15:53:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 64008 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp549836lbc; Thu, 17 Mar 2016 08:53:22 -0700 (PDT) X-Received: by 10.66.55.102 with SMTP id r6mr15861307pap.67.1458230002209; Thu, 17 Mar 2016 08:53:22 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id st10si3720769pab.60.2016.03.17.08.53.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Mar 2016 08:53:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8F7311A1E65; Thu, 17 Mar 2016 08:53:41 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 73FFD1A1E64 for ; Thu, 17 Mar 2016 08:53:40 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id p65so32309595wmp.1 for ; Thu, 17 Mar 2016 08:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JMiLmBRXgzelAdIb+ywUFCBubqsjHymI9x93JFdXPyU=; b=kb+H5AmtSziSk8gal5Utr3LysE3ztf6b5lwdYD2XYbPOD7wFY3/Mf50UEl76gW0LBt Kz26ToRQHjt0rENDS5LdQllSPC7f/v+c72xEkHeayWj5Nl0usT84diu+Wi50jPW2XLmW 6pPXGLIG1dX3sOLypO+J3EYtq+5QMJV7kWtG8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JMiLmBRXgzelAdIb+ywUFCBubqsjHymI9x93JFdXPyU=; b=QZmWpAI0zSVIgJjkGrgoQciksxQYrt/1QVX0ifFza+VBSuffzmdhHHLH9nPyrioIcJ l+3bPj+AWbMHasu7jU9FaITPP3j0M/9XVq1Ng/eX5WERSPdiyaz6xN0hGwkFYM1h7E+h 4uhXZqef3rZMlKhSw+PNgJEE/SglWdxQ6EjqI9CYXEzhx0GSbLlg5ADAMMk7lTctRwVX nHKmND6c/BDIs5pxj27Bz6Ydxgknihoash3TUBDkv8dYDb/ENQ9BZxF460pPLarFNWGS 6a3zH4h1JEtfZBwvI101HWxEWHqu9OrO+ObFD1fNPnjAGrNTP5Bj4Ku/sch7W7WL5GA4 suLQ== X-Gm-Message-State: AD7BkJJ+BUAU9UcjKe1RJ0B4XuIOIMMvp2ikbxbKUEo62VInjLktVXI8hRAz+Y4pK+px3gWE X-Received: by 10.194.89.70 with SMTP id bm6mr12368653wjb.0.1458229998871; Thu, 17 Mar 2016 08:53:18 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc92308-cmbg19-2-0-cust814.5-4.cable.virginm.net. [82.24.251.47]) by smtp.gmail.com with ESMTPSA id p189sm30947860wmb.7.2016.03.17.08.53.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Mar 2016 08:53:18 -0700 (PDT) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Thu, 17 Mar 2016 15:53:14 +0000 Message-Id: <1458229994-13192-1-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A115574940@shsmsx102.ccr.corp.intel.com> References: <4A89E2EF3DFEDB4C8BFDE51014F606A115574940@shsmsx102.ccr.corp.intel.com> Subject: [edk2] [PATCH] MdePkg: add UNUSED notation to Base.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Liming Gao MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" To permit many existing platforms to build with -Wunused-parameter, on GCC and CLANG, the unused parameters need to be annotated as such. Existing regexp code already uses ARG_UNUSED for this, but it is really needed across the codebase - so add a version called UNUSED in Base.h. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- Change since RFC: rename ARG_UNUSED -> UNUSED. MdePkg/Include/Base.h | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.1.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 89b2aed..a68b209 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -189,6 +189,15 @@ struct _LIST_ENTRY { /// #define OPTIONAL +/// +/// Function argument intentionally unused in function. +/// +#if defined(__GNUC__) || defined(__clang__) + #define UNUSED __attribute__ ((unused)) +#else + #define UNUSED +#endif + // // UEFI specification claims 1 and 0. We are concerned about the // complier portability so we did it this way.