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@xxxxxxxxxxxxxx> 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@xxxxxxxxx> > > > --- > > > > 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@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox