From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/4] mtd: ubi: Compile fastmap.c with -Wno-address-of-packed-member
Date: Thu, 12 Sep 2019 08:55:37 +0200 [thread overview]
Message-ID: <20190912065537.2tsjevnq4x7oekno@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqFmsxHEcEzpDN5VQqZsnuj8HhAoMQhLUQ+KUdWnw2WjMQ@mail.gmail.com>
On Mon, Sep 09, 2019 at 09:28:17PM -0700, Andrey Smirnov wrote:
> On Mon, Sep 9, 2019 at 3:23 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > On Sat, Sep 07, 2019 at 04:54:55PM -0700, Andrey Smirnov wrote:
> > > GCC9 for ARM produces the following warnings:
> > >
> > > fastmap.c: In function 'ubi_attach_fastmap':
> > > fastmap.c:700:31: warning: taking address of packed member of 'struct ubi_fm_scan_pool' may result in an unaligned pointer value [-Waddress-of-packed-member]
> > > 700 | ret = scan_pool(ubi, ai, fmpl->pebs, pool_size, &max_sqnum, &lfree);
> > > | ~~~~^~~~~~
> > > fastmap.c:704:34: warning: taking address of packed member of 'struct ubi_fm_scan_pool' may result in an unaligned pointer value [-Waddress-of-packed-member]
> > > 704 | ret = scan_pool(ubi, ai, fmpl_wl->pebs, wl_pool_size, &max_sqnum, &lfree);
> > > | ~~~~~~~^~~~~~
> > >
> > > the offending code seems OK and there doesn't seem to be a way to fix
> > > this in code, so disable the warning for that file.
> > >
> > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> > > ---
> >
> > Linux disables this warning completely.
>
> Yeah, I saw that. Wasn't sure if we wanted to go that direction or not.
>
> > We just burnt some developer
> > cycles, came to the conclusion that the world isn't perfect, that
> > there's no good (at least good realistic) solution to this problem and
> > that we should just do the same as Linux.
> >
> > Disabling this warning for individual files in which it triggers
> > probably doesn't bring us further.
> >
>
> Sure, will do. I think "ratp: Mark struct ratp_bb as packed" might
> still be worth applying though.
Applied this and also [PATCH 2/4] net: Adjust net_copy_uint32's
signature
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-09-12 6:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 23:54 [PATCH 1/4] ratp: Mark struct ratp_bb as packed Andrey Smirnov
2019-09-07 23:54 ` [PATCH 2/4] net: Adjust net_copy_uint32's signature Andrey Smirnov
2019-09-07 23:54 ` [PATCH 3/4] mtd: ubi: Compile fastmap.c with -Wno-address-of-packed-member Andrey Smirnov
2019-09-09 10:23 ` Sascha Hauer
2019-09-10 4:28 ` Andrey Smirnov
2019-09-12 6:55 ` Sascha Hauer [this message]
2019-09-07 23:54 ` [PATCH 4/4] USB: gadget: Compile composite.c " Andrey Smirnov
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=20190912065537.2tsjevnq4x7oekno@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/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