[Bug 219203] xfsprogs-6.10.0: missing cast in /usr/include/xfs/xfs_fs.h(xfs_getparents_next_rec) causes error in C++ compilations

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=219203

--- Comment #3 from Matt Whitlock (kernel@xxxxxxxxxxxxxxxxx) ---
(In reply to Darrick J. Wong from comment #2)
> -       void *next = ((void *)gpr + gpr->gpr_reclen);
> +       void *next = ((char *)gpr + gpr->gpr_reclen);

G++ 14 apparently didn't care about the arithmetic on a void*. Only the cast in
the return statement was necessary for libktorrent to include <xfs/xfs_fs.h>
without error. (I did not check whether the compiler emitted a warning.)
Certainly it is preferable to do arithmetic on a pointer to a type of known
size, so thanks for suggesting this other fix as well.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[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