Re: [PATCH] xfsprogs: don't warn about packed members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/16/19 3:52 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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@xxxxxxxxxx>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux