xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/9] xfsprogs: fix warning in adfs superblock probe
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 17 Jan 2010 07:11:57 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1263463752-5052-5-git-send-email-david@xxxxxxxxxxxxx>
References: <1263463752-5052-1-git-send-email-david@xxxxxxxxxxxxx> <1263463752-5052-5-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
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@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>