]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfsprogs: don't warn about packed members
authorDave Chinner <dchinner@redhat.com>
Fri, 13 Mar 2020 14:22:07 +0000 (10:22 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 13 Mar 2020 14:22:07 +0000 (10:22 -0400)
commit845e5ef706cb7e29259d6541f43a7029e7dc7898
tree4ef9eb74953da6d9eb1415c621180e5d684b0305
parentcaf45d565601222d6bf9ec1c862755b440181506
xfsprogs: don't warn about packed members

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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: kernel has done this globally as well in 6f303d60534]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/builddefs.in