| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/2] xfs: rearrange xfs_mod_sb() to avoid array subscript warning |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Tue, 19 Jan 2010 22:11:55 +1100 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20100119092320.GD1784@xxxxxxxxxxxxx> |
| References: | <1263861711-13900-1-git-send-email-david@xxxxxxxxxxxxx> <1263861711-13900-3-git-send-email-david@xxxxxxxxxxxxx> <20100119092320.GD1784@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
On Tue, Jan 19, 2010 at 04:23:20AM -0500, Christoph Hellwig wrote: > On Tue, Jan 19, 2010 at 11:41:51AM +1100, Dave Chinner wrote: > > gcc warns of an array subscript out of bounds in xfs_mod_sb(). > > The code is written in such a way that if the array subscript is > > out of bounds, then it will assert fail. Rearrange the code to > > avoid the bounds check warning. > > Does it avoid the warning also for non-debug builds where the assert > goes away? Anyway, the reordering is correct, so: Yes. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/2] xfsprogs: Do not remove configure information on clean, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH 8/8] xfs: make compile warn about char sign mismatches again, Dave Chinner |
| Previous by Thread: | Re: [PATCH 2/2] xfs: rearrange xfs_mod_sb() to avoid array subscript warning, Christoph Hellwig |
| Next by Thread: | [PATCH 1/2] xfs: suppress spurious uninitialised var warning in xfs_bmapi(), Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |