Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failures with GCC 15 (-std=gnu23) #25

Open
kostadinsh opened this issue Nov 26, 2024 · 0 comments
Open

Build failures with GCC 15 (-std=gnu23) #25

kostadinsh opened this issue Nov 26, 2024 · 0 comments

Comments

@kostadinsh
Copy link

kostadinsh commented Nov 26, 2024

Some of the programs in alsa-tools fail to build with upcoming GCC 15 which uses -std=gnu23 by default. This can be reproduced on older GCC and Clang versions by adding -std=gnu23 to CFLAGS.

Downstream Gentoo bug report: https://bugs.gentoo.org/943946

hdajackretask:

apply-changes.c:358:10: error: conflicting types for ‘reset_changes_boot’; have ‘gboolean(GError **)’ {aka ‘int(struct _GError **)’}
  358 | gboolean reset_changes_boot(GError** err)
      |          ^~~~~~~~~~~~~~~~~~
In file included from apply-changes.c:12:
apply-changes.h:12:10: note: previous declaration of ‘reset_changes_boot’ with type ‘gboolean(void)’ {aka ‘int(void)’}
   12 | gboolean reset_changes_boot();
      |          ^~~~~~~~~~~~~~~~~~
main-gtk.c: In function ‘reset_boot_clicked’:
main-gtk.c:375:5: error: too many arguments to function ‘reset_changes_boot’
  375 |     reset_changes_boot(&err);
      |     ^~~~~~~~~~~~~~~~~~
In file included from main-gtk.c:11:
apply-changes.h:12:10: note: declared here
   12 | gboolean reset_changes_boot();
      |          ^~~~~~~~~~~~~~~~~~

envy24control:

new_process.c: In function ‘new_process’:
new_process.c:67:18: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘__sighandler_t’ {aka ‘void (*)(int)’} [-Wincompatible-pointer-types]
   67 |         int_stat = signal(SIGINT, SIG_IGN);
      |                  ^
new_process.c:68:19: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘__sighandler_t’ {aka ‘void (*)(int)’} [-Wincompatible-pointer-types]
   68 |         quit_stat = signal(SIGQUIT, SIG_IGN);
      |                   ^
new_process.c:69:19: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘__sighandler_t’ {aka ‘void (*)(int)’} [-Wincompatible-pointer-types]
   69 |         usr2_stat = signal(SIGUSR2, SIG_IGN);
      |                   ^
new_process.c:81:24: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
   81 |         signal(SIGINT, int_stat);
      |                        ^~~~~~~~
      |                        |
      |                        void (*)(void)
In file included from envy24control.h:4:
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
new_process.c:82:25: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
   82 |         signal(SIGQUIT, quit_stat);
      |                         ^~~~~~~~~
      |                         |
      |                         void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
new_process.c:83:25: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
   83 |         signal(SIGUSR2, usr2_stat);
      |                         ^~~~~~~~~
      |                         |
      |                         void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
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

No branches or pull requests

1 participant