All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfsprogs: don't warn about packed members
Date: Fri, 13 Mar 2020 09:07:41 -0500	[thread overview]
Message-ID: <2c3a3e1d-6882-f23c-a242-30653b617e56@sandeen.net> (raw)
In-Reply-To: <20191216215245.13666-1-david@fromorbit.com>

On 12/16/19 3:52 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> gcc 9.2.1 throws lots of new warnings during the build like this:
> 
> xfs_format.h:790:3: warning: taking address of packed member of ‘struct xfs_agfl’ may result in an unaligned pointer value [-Waddress-of-packed-member]
>   790 |   &(XFS_BUF_TO_AGFL(bp)->agfl_bno[0]) : \
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> xfs_alloc.c:3149:13: note: in expansion of macro ‘XFS_BUF_TO_AGFL_BNO’
>  3149 |  agfl_bno = XFS_BUF_TO_AGFL_BNO(mp, agflbp);
>       |             ^~~~~~~~~~~~~~~~~~~
> 
> We know this packed structure aligned correctly, so turn off this
> warning to shut gcc up.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

I guess if it's good enough for the kernel ...

I'll probably add a short note to the commit, and

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

      parent reply	other threads:[~2020-03-13 14:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 21:52 [PATCH] xfsprogs: don't warn about packed members Dave Chinner
2019-12-17 11:54 ` Brian Foster
2019-12-17 17:09   ` Darrick J. Wong
2020-01-26 11:02 ` Christoph Hellwig
2020-01-27 17:43   ` Eric Sandeen
2020-01-29  6:46     ` Christoph Hellwig
2020-03-12 14:09     ` Christoph Hellwig
2020-03-13 14:06       ` Eric Sandeen
2020-04-24 10:33         ` Christoph Hellwig
2020-04-24 17:42           ` Darrick J. Wong
2020-04-24 17:52             ` Eric Sandeen
2020-04-25  7:16               ` Christoph Hellwig
2020-03-13 14:07 ` Eric Sandeen [this message]

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=2c3a3e1d-6882-f23c-a242-30653b617e56@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.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 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.