From: Adrian Bunk <bunk@stusta.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] mdadm: fix gcc8 maybe-uninitialized/format-overflow warning
Date: Wed, 20 Mar 2019 17:00:21 +0200 [thread overview]
Message-ID: <20190320150021.GB31018@localhost> (raw)
In-Reply-To: <CAMKF1soQbssBdHEgmdGmeNFPWWQH+FdRbdzBuPDo_TOdnY0oRA@mail.gmail.com>
On Wed, Mar 20, 2019 at 08:59:39AM -0400, Khem Raj wrote:
> On Wed, Mar 20, 2019 at 1:21 AM Adrian Bunk <bunk@stusta.de> wrote:
> >
> > On Tue, Mar 19, 2019 at 11:51:47PM -0400, Khem Raj wrote:
> > > On Fri, Mar 15, 2019 at 6:45 AM Adrian Bunk <bunk@stusta.de> wrote:
> > > >
> > > > On Tue, Mar 12, 2019 at 05:41:58PM +0800, changqing.li@windriver.com wrote:
> > > > > From: Changqing Li <changqing.li@windriver.com>
> > > > >
> > > > > while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=,
> > > > > it failed
> > > > >
> > > > > [snip]
> > > > > | Incremental.c: In function 'Incremental_container':
> > > > > | Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> > > > > | close(mdfd);
> > > > > | ^~~~~~~~~~~
> > > > >
> > > > > [snip]
> > > > > super-intel.c: In function 'apply_takeover_update':
> > > > > | super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
> > > > > | " MISSING_%d", du->index);
> > > > > | ^~
> > > > >...
> > > >
> > > > I am seeing these warnings only with -Og, are you also seeing them with
> > > > -Og (DEBUG_OPTIMIZATION) only?
> > > >
> > > > If this is true, I would consider
> > > > https://sources.debian.org/src/mdadm/4.1-2/debian/patches/debian-no-Werror.diff/
> > > > a better workaround.
> > > >
> > > This seems a broader brush, I really dont like to relegate Werror if
> > > we dont have to, because it will force us
> > > to fix the code.
> >
> > How are we getting such fixes properly reviewed?
> >
> > What actually happens is that the easiest change that silences a warning
> > gets applied.
> >
> > And for such bogus -Og only warnings there was no problem in the code,
>
> so then probably a better fix is to add -Wno-error to DEBUG_FLAGS
> which will limit it to -Og case, and revert the original fix.
For mdadm this might work, for puzzles it would not.
Order matters, and upstream can insert your flags before or after
the -Werror. So unfortunately this would not cover all recipes.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2019-03-20 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:41 [PATCH] mdadm: fix gcc8 maybe-uninitialized/format-overflow warning changqing.li
2019-03-15 10:45 ` Adrian Bunk
2019-03-20 3:51 ` Khem Raj
2019-03-20 5:21 ` Adrian Bunk
2019-03-20 12:59 ` Khem Raj
2019-03-20 13:43 ` Richard Purdie
2019-03-20 15:00 ` Adrian Bunk [this message]
2019-03-20 17:06 ` Khem Raj
2019-03-22 3:49 ` Changqing Li
2019-03-22 3:57 ` [PATCH V2] mdadm: add -Wno-error to DEBUG_OPTIMIZATION changqing.li
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-all 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=20190320150021.GB31018@localhost \
--to=bunk@stusta.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.