public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Tomas Pilar (tpilar)" <tpilar@solarflare.com>, edk2-devel@lists.01.org
Subject: Re: [PATCH] MdeModulePkg:disable wraning to pass gcc4.8 build
Date: Mon, 1 Oct 2018 20:01:55 +0200	[thread overview]
Message-ID: <84933915-ca19-0c38-f772-953927a41144@redhat.com> (raw)
In-Reply-To: <e4131806-14d5-b11b-5b68-2c552fcadf0c@redhat.com>

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


  reply	other threads:[~2018-10-01 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-29  1:55 [PATCH] MdeModulePkg:disable wraning to pass gcc4.8 build Dongao Guo
2018-09-29  2:20 ` Gao, Liming
2018-09-29  2:29 ` Zeng, Star
2018-10-01  9:23 ` Tomas Pilar (tpilar)
2018-10-01 17:48   ` Laszlo Ersek
2018-10-01 18:01     ` Laszlo Ersek [this message]
2018-10-08  3:04       ` Gao, Liming
2018-10-08 10:49         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84933915-ca19-0c38-f772-953927a41144@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox