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

-Wincompatible-pointer-types is now an error #411

Open
Narrat opened this issue Jul 28, 2024 · 5 comments
Open

-Wincompatible-pointer-types is now an error #411

Narrat opened this issue Jul 28, 2024 · 5 comments

Comments

@Narrat
Copy link

Narrat commented Jul 28, 2024

Hi,
GCC seems to have adjusted their handling with -Wincompatible-pointer-types. What has been a warning is now an error:

src/bimp-manipulations-gui.c: In function ‘bimp_open_editwindow’:
src/bimp-manipulations-gui.c:48:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_resize_set *)’ [-Wincompatible-pointer-types]
   48 |         save = &bimp_resize_save;
      |              ^
src/bimp-manipulations-gui.c:52:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_crop_set *)’ [-Wincompatible-pointer-types]
   52 |         save = &bimp_crop_save;
      |              ^
src/bimp-manipulations-gui.c:56:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_fliprotate_set *)’ [-Wincompatible-pointer-types]
   56 |         save = &bimp_fliprotate_save;
      |              ^
src/bimp-manipulations-gui.c:60:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_color_set *)’ [-Wincompatible-pointer-types]
   60 |         save = &bimp_color_save;
      |              ^
src/bimp-manipulations-gui.c:64:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_sharpblur_set *)’ [-Wincompatible-pointer-types]
   64 |         save = &bimp_sharpblur_save;
      |              ^
src/bimp-manipulations-gui.c:68:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_changeformat_set *)’ [-Wincompatible-pointer-types]
   68 |         save = &bimp_changeformat_save;
      |              ^
src/bimp-manipulations-gui.c:72:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_watermark_set *)’ [-Wincompatible-pointer-types]
   72 |         save = &bimp_watermark_save;
      |              ^
src/bimp-manipulations-gui.c:76:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_rename_set *)’ [-Wincompatible-pointer-types]
   76 |         save = &bimp_rename_save;
      |              ^
src/bimp-manipulations-gui.c:80:14: error: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(struct manip_userdef_set *)’ [-Wincompatible-pointer-types]
   80 |         save = &bimp_userdef_save;
      |              ^
@jeffbzrr
Copy link

Same problem here.
Add -fcommon in makefile dont work

@doing-science
Copy link

Adding "-fpermissive" to the end of the CFLAGS line in the Makefile allowed me to compile.

CFLAGS += $(GIMP_CFLAGS) -Wall -Wno-unused-variable -Wno-pointer-sign -DGIMP_DISABLE_DEPRECATED -fpermissive

@biopsin
Copy link

biopsin commented Aug 15, 2024

What gcc version is this? I build with v.13.2 for x86_64-libc and I cant trigger it.
Also closes pull #412

@doing-science
Copy link

What gcc version is this? I build with v.13.2 for x86_64-libc and I cant trigger it. Also closes pull #412

I'm using gcc 14.1.1 20240720

See the '-fpermisive' section here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html which specifically mentions '-Wincompatible-pointer-types'

@jeffbzrr
Copy link

hi guys, thanks so much but i install using flatpak

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

4 participants