diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:35 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:35 -0800 |
commit | 6b5d917780219d0d8f8e2cefefcb6f50987d0fa3 (patch) | |
tree | 66040ae8b60583ae49bf23022dbac49cb23eb333 /fs/xfs/libxfs | |
parent | 576d30ecb620ae3bc156dfb2a4e91143e7f3256d (diff) | |
download | linux-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.tar.gz linux-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.tar.bz2 linux-6b5d917780219d0d8f8e2cefefcb6f50987d0fa3.zip |
xfs: dont cast to char * for XFS_DFORK_*PTR macros
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.
Can't satisfy all these dman bots.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_format.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h index 9a88aba1589f..f16974126ff9 100644 --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/libxfs/xfs_format.h @@ -1008,7 +1008,7 @@ enum xfs_dinode_fmt { * Return pointers to the data or attribute forks. */ #define XFS_DFORK_DPTR(dip) \ - ((char *)dip + xfs_dinode_size(dip->di_version)) + ((void *)dip + xfs_dinode_size(dip->di_version)) #define XFS_DFORK_APTR(dip) \ (XFS_DFORK_DPTR(dip) + XFS_DFORK_BOFF(dip)) #define XFS_DFORK_PTR(dip,w) \ |