From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7XlY-0001Mc-SN for barebox@lists.infradead.org; Tue, 10 Sep 2019 04:28:34 +0000 Received: by mail-io1-xd42.google.com with SMTP id r26so34346158ioh.8 for ; Mon, 09 Sep 2019 21:28:30 -0700 (PDT) MIME-Version: 1.0 References: <20190907235456.21535-1-andrew.smirnov@gmail.com> <20190907235456.21535-3-andrew.smirnov@gmail.com> <20190909102306.kt3wiq5ldnxrjvg7@pengutronix.de> In-Reply-To: <20190909102306.kt3wiq5ldnxrjvg7@pengutronix.de> From: Andrey Smirnov Date: Mon, 9 Sep 2019 21:28:17 -0700 Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 3/4] mtd: ubi: Compile fastmap.c with -Wno-address-of-packed-member To: Sascha Hauer Cc: Barebox List On Mon, Sep 9, 2019 at 3:23 AM Sascha Hauer 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 > > --- > > 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. Thanks, Andrey Smirnov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox