From: bugzilla-daemon@kernel.org
To: linux-xfs@vger.kernel.org
Subject: [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: Tue, 27 Aug 2024 23:12:50 +0000 [thread overview]
Message-ID: <bug-219203-201763-AZs1owRnQK@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-219203-201763@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=219203
--- Comment #3 from Matt Whitlock (kernel@mattwhitlock.name) ---
(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.
next prev parent reply other threads:[~2024-08-27 23:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 21:07 [Bug 219203] New: xfsprogs-6.10.0: missing cast in /usr/include/xfs/xfs_fs.h(xfs_getparents_next_rec) causes error in C++ compilations bugzilla-daemon
2024-08-27 21:40 ` Dave Chinner
2024-08-27 22:30 ` Darrick J. Wong
2024-08-28 0:10 ` Dave Chinner
2024-08-27 21:40 ` [Bug 219203] " bugzilla-daemon
2024-08-27 22:30 ` bugzilla-daemon
2024-08-27 23:12 ` bugzilla-daemon [this message]
2024-08-28 0:10 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-219203-201763-AZs1owRnQK@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox