Re: [PATCH 4/9] xfs: dont cast to char * for XFS_DFORK_*PTR macros

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

 



On Wed, Dec 13, 2023 at 02:54:18PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Code in the next patch will assign the return value of XFS_DFORK_*PTR
> macros to a struct pointer.  gcc complains about casting char* strings
> to struct pointers, so let's fix the macro's cast to void* to shut up
> the warnings.
> 
> While we're at it, fix one of the scrub tests that uses PTR to use BOFF
> instead for a simpler integer comparison, since other linters whine
> about char* and void* comparisons.

Well, comparing different point types should be reject even by the
compiler.  But the BOFF check look much nicer anyway..

The patch looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[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