Re: [PATCH 4/9] xfsprogs: fix warning in adfs superblock probe

Christoph Hellwig
2010-01-17T12:10:59Z

On Thu, Jan 14, 2010 at 09:09:07PM +1100, Dave Chinner wrote:
> The probe gets an array subscript warning because gcc is not smart
> enough to realise that a structure made up of multiple byte arrays
> in it can be referenced as a flat buffer and it is valid to access
> bytes beyond the first array in the structure....
>
> Fix it by passing the adfs superblock in and using the internal
> checksum array to get the checksum value.

The check still seems horribly ugly, but hey given that this is code
superceeded by blkid it should be good enough,

Reviewed-by: Christoph Hellwig <hch@lst.de>