public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: xfsprogs-6.10 breaks C++ compilation
Date: Tue, 27 Aug 2024 22:09:37 +0100	[thread overview]
Message-ID: <8734mpd65q.fsf@gentoo.org> (raw)

Hi!

Forwarding a downstream report from https://bugs.gentoo.org/938569.

xfs_fs.h's xfs_getparents_next_rec relies on an implicit void*-to-T*
cast which is legal in C, but not C++.

It fails like so when a C++ project tries to use the header:
```
/usr/include/xfs/xfs_fs.h: In function 'xfs_getparents_rec* xfs_getparents_next_rec(xfs_getparents*, xfs_getparents_rec*)':
/usr/include/xfs/xfs_fs.h:915:16: error: invalid conversion from 'void*' to 'xfs_getparents_rec*' [-fpermissive]
  915 |         return next;
      |                ^~~~
      |                |
      |                void*

```

It came up when building libktorrent.

thanks,
sam

             reply	other threads:[~2024-08-27 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 21:09 Sam James [this message]
2024-08-27 21:11 ` xfsprogs-6.10 breaks C++ compilation Sam James

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=8734mpd65q.fsf@gentoo.org \
    --to=sam@gentoo.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