From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8D06E21157FDF for ; Mon, 1 Oct 2018 11:01:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D8FFC03E013; Mon, 1 Oct 2018 18:01:57 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-68.rdu2.redhat.com [10.10.123.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE1772010DB6; Mon, 1 Oct 2018 18:01:56 +0000 (UTC) From: Laszlo Ersek To: "Tomas Pilar (tpilar)" , edk2-devel@lists.01.org References: <1538186116-3792-1-git-send-email-dongao.guo@intel.com> <7b490137-3c8a-b5e3-9b48-c4ba1a3d588b@solarflare.com> Message-ID: <84933915-ca19-0c38-f772-953927a41144@redhat.com> Date: Mon, 1 Oct 2018 20:01:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 01 Oct 2018 18:01:57 +0000 (UTC) Subject: Re: [PATCH] MdeModulePkg:disable wraning to pass gcc4.8 build X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 18:01:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Wait a sec: On 10/01/18 19:48, Laszlo Ersek wrote: > However, this (edk2) commit message seems to suggest that the warnings > are only present with gcc-4.8 (and no later gcc releases). This in turn > suggests that the warnings are spurious (presumably, later gcc releases > recognize that none of the affected variables are actually read without > a prior initialization or assignment.) > > Hence, upstream Oniguruma might argue that we should fix our compiler -- > they might consider gcc-4.8 too old to care -- rather than litter their > code with superfluous assignments, just to pacify gcc-4.8. [...] > So, I think I agree with this patch, but the commit message should be a > *lot* more detailed. (Basically, include the analysis from above.) In fact, another improvement is possible: if the issue only affects gcc-4.8, then: >> On 29/09/18 02:55, Dongao Guo wrote: >>> Change-Id: I782962e4994a8edf14beb7ede8b1aabe233dc3a8 >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> --- >>> MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf >>> index 16e91bd..07bc02e 100644 >>> --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf >>> +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf >>> @@ -109,3 +109,6 @@ >>> >>> # Oniguruma: error: variable 'fp' set but not used >>> GCC:*_*_*_CC_FLAGS = -Wno-error=unused-but-set-variable >>> + >>> + # Oniguruma: tag_end in parse_callout_of_name >>> + GCC:*_*_*_CC_FLAGS = -Wno-error=maybe-uninitialized this toolchain glob pattern is too general. It should be: GCC:*_GCC48_*_CC_FLAGS (or maybe spell it out for all GCC versions up to and including 4.8, from the earliest we support, 4.4.) Thanks Laszlo