From patchwork Fri Mar 18 08:50:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 64046 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp924951lbc; Fri, 18 Mar 2016 01:50:52 -0700 (PDT) X-Received: by 10.66.152.231 with SMTP id vb7mr21872042pab.132.1458291025480; Fri, 18 Mar 2016 01:50:25 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id z27si10854551pfi.21.2016.03.18.01.50.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Mar 2016 01:50:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 7798B1A1ED2; Fri, 18 Mar 2016 01:50:44 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (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 89D611A1ED1 for ; Fri, 18 Mar 2016 01:50:43 -0700 (PDT) Received: by mail-ig0-x22e.google.com with SMTP id vf5so16904563igb.0 for ; Fri, 18 Mar 2016 01:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=ceAQ141RkYs1nUFc9aZE19fGJYxbzBL9H2mSJ8jF6cM=; b=g7e+/fn18uTBp/oQ5iUrfLAg0wQjzOyA1Bf83OOVtXeZtVj/iFYdrdh8pAJyrRO/WS /ghT1xWGLJAKZrtmXy1HF/Hs+Ay8IfPfSCwGOMrZj67BxZm6R35vP/1zPKBum4G6C8VD RzO++ziIjNDqE3BSlCRD7GgLpcOMXsgdaVOAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=ceAQ141RkYs1nUFc9aZE19fGJYxbzBL9H2mSJ8jF6cM=; b=dihL/IR3adnmWWW89uIi2xOsmyBxvvThUkrcoJGDrbsFKPZHSNG0R8Sze2XLSly51j 3QSchFmTEazZY/NFvJREs/5bkzr5mkdSSFDt8o+RiDyhZZZEoN9AQayOq1rhlqbh7Cek Jd33i4Q5SHVfMtVdkjV4c5WIhoYJCroX5VeoF0KiM5wUJb2YqmcBRmuG1cihG358O2uG 3Cy54FgfbHBaTO+bEPoDYGOZud7BowveQ8Bq+8Km3HkzNP80RiwVvamgOk2RYSYRk5ss zYdrnzE3sZWqazbZPy1MddoVJJl+jM3GKchHHa37lxNpjhT8RktwbjUH4+D8jjaIgMxj QyjA== X-Gm-Message-State: AD7BkJK6BvgSoBVlU8x9wzgRHpGcIfhLTxETvyXe15rfn7qMB6EjGEofQ3uUUTY4FJ9coJiwkOCkUkuHlNvcIKm6 MIME-Version: 1.0 X-Received: by 10.50.129.8 with SMTP id ns8mr16684999igb.95.1458291022284; Fri, 18 Mar 2016 01:50:22 -0700 (PDT) Received: by 10.64.128.38 with HTTP; Fri, 18 Mar 2016 01:50:22 -0700 (PDT) In-Reply-To: <56EB0AB6.2020305@redhat.com> References: <4A89E2EF3DFEDB4C8BFDE51014F606A115574940@shsmsx102.ccr.corp.intel.com> <1458229994-13192-1-git-send-email-leif.lindholm@linaro.org> <20160317165310.GL2904@bivouac.eciton.net> <20160317180502.GN2904@bivouac.eciton.net> <56EB0AB6.2020305@redhat.com> Date: Fri, 18 Mar 2016 08:50:22 +0000 Message-ID: From: Leif Lindholm To: Laszlo Ersek Subject: Re: [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: Ard Biesheuvel , "edk2-devel@lists.01.org" , Andrew Fish , "Gao, Liming" , Mike Kinney , Shumin Qiu Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" On 17 March 2016 at 19:51, Laszlo Ersek wrote: >> I must confess to no small amount of surprise that optionally adding >> the ability to tag an unused argument as unused is controversial. > > I'm also surprised, but by a different thing. :) > (2) Beyond removing "-Wno-unused-but-set-variable", I then added > "-Wunused-parameter -Wunused-but-set-parameter". > > Oh boy. :) First, a large number of "AutoGen.c" files (maybe all of > them?) seem to hit it. I simply filtered those out. Yeah, so far I have: (No, I'm _not_ suggesting merging that. Hilariously, that snippet causes build failures with GCC due to unknown pragmas...) > Second, the remaining set of warnings is also huge: almost 4000 > instances. The list of locations is too large to attach or paste (and I > don't think the list will allow compressed attachments), so I'm > uploading it here: > . > > If I understand correctly, if we wanted to enable "-Wunused-parameter > -Wunused-but-set-parameter" even just occasionally, these ~4000 > instances would have to be audited, and each should be either fixed > (i.e., internal functions should drop the parameters) or marked UNUSED > (i.e., library instances and PPI/protocol implementations should > annotate their definitions of public functions). > > Thus, this is what surprises me. It looks daunting. Oh indeed. I just wanted to tools to enable it - and it sounds like that bit is not the controversial one. / Leif _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 842d8bd..418bc47 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -59,6 +59,9 @@ gAutoGenHeaderString = TemplateString("""\ ${FileName} Abstract: Auto-generated ${FileName} for building module or library. **/ +#pragma GCC diagnostic ignored "-Wunused-macros" +#pragma GCC diagnostic ignored "-Wmissing-variable-declarations" +#pragma GCC diagnostic ignored "-Wunused-parameter" """) gAutoGenHPrologueString = TemplateString("""