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

Error when building with gcc #19

Closed
Luminiscental opened this issue May 16, 2024 · 3 comments
Closed

Error when building with gcc #19

Luminiscental opened this issue May 16, 2024 · 3 comments

Comments

@Luminiscental
Copy link

I cloned master, built using the arch PKGBUILD, and encountered this error:

headerbarui.c: In function ‘window_init_hook’:
headerbarui.c:1186:31: error: passing argument 1 of ‘action_shuffle_mode_init’ from incompatible pointer type [-Wincompatible-pointer-types]
 1186 |     action_shuffle_mode_init (g_action_map_lookup_action (G_ACTION_MAP (group), "shufflemode"));
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                               |
      |                               GAction * {aka struct _GAction *}
headerbarui.c:484:41: note: expected ‘GSimpleAction *’ {aka ‘struct _GSimpleAction *’} but argument is of type ‘GAction *’ {aka ‘struct _GAction *’}
  484 | action_shuffle_mode_init(GSimpleAction *action)
      |                          ~~~~~~~~~~~~~~~^~~~~~
headerbarui.c:1191:30: error: passing argument 1 of ‘action_repeat_mode_init’ from incompatible pointer type [-Wincompatible-pointer-types]
 1191 |     action_repeat_mode_init (g_action_map_lookup_action (G_ACTION_MAP (group), "repeatmode"));
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              GAction * {aka struct _GAction *}
headerbarui.c:556:40: note: expected ‘GSimpleAction *’ {aka ‘struct _GSimpleAction *’} but argument is of type ‘GAction *’ {aka ‘struct _GAction *’}
  556 | action_repeat_mode_init(GSimpleAction *action)
      |                         ~~~~~~~~~~~~~~~^~~~~~

Full build output: log.txt

@dreirund
Copy link

dreirund commented May 17, 2024

@Luminiscental, can you make your bug report more specific?

I have the same issue, I would title it like "Fails to build with headerbarui.c:1186:31: error: passing argument 1 of ‘action_shuffle_mode_init’ from incompatible pointer type [-Wincompatible-pointer-types], GCC 14.1.1"

(I am on GCC 14.1.1.)

Adding -Wno-error=incompatible-pointer-types to CFLAGS and CXXFLAGS environment variables does workaround this. But in the root cause, the sources need to be fixed.

@saivert
Copy link
Owner

saivert commented May 17, 2024

Yes gcc now has stricter checks. I will fix later.

@saivert
Copy link
Owner

saivert commented May 18, 2024

Fixed now.

@saivert saivert closed this as completed May 18, 2024
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

3 participants