Skip to content

Conversation

@joanbm
Copy link
Contributor

@joanbm joanbm commented May 1, 2025

GCC 15 defaults to the C23 standard, where functions declarations without parameters are interpreted as having no parameters.

Declare the gpointer = void* parameter for g_thread_new callbacks to avoid a build failure due to -Wincompatible-pointer-types in Linux distros like Fedora 42 and Arch:

error: passing argument 2 of 'g_thread_new' from incompatible pointer type [-Wincompatible-pointer-types]

Fixes: #468

GCC 15 defaults to the C23 standard, where functions declarations
without parameters are interpreted as having no parameters:
https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters

Declare the `gpointer = void*` parameter for `g_thread_new` callbacks
to avoid a build failure due to `-Wincompatible-pointer-types`.

Fixes: #468
@joanbm
Copy link
Contributor Author

joanbm commented Jul 22, 2025

Closing because #481 fixed the same issue.

@joanbm joanbm closed this Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails to compile on Fedora 42

2 participants