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

Fix incompatible function pointer types #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Flowdalic
Copy link

No description provided.

Fix

src/filebrowser.c:380:27: warning: incompatible function pointer types initializing '_mode_get_icon' (aka 'struct _cairo_surface *(*)(const struct rofi_mode *, unsigned int, unsigned int)') with an expression of type 'cairo_surface_t *(const Mode *, unsigned int, int)' (aka 'struct _cairo_surface *(const struct rofi_mode *, unsigned int, int)') [-Wincompatible-function-pointer-types]
    ._get_icon          = file_browser_get_icon,
                          ^~~~~~~~~~~~~~~~~~~~~

See also https://bugs.gentoo.org/880985
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Nov 11, 2022
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 13, 2024
The build fails with the following error:

FAILED: CMakeFiles/filebrowser.dir/src/filebrowser.c.o
/usr/bin/cc -D_XOPEN_SOURCE=700 -Dfilebrowser_EXPORTS -I/wrkdirs/usr/ports/x11/rofi-file-browser-extended/work/rofi-file-browser-extended-1.3.1/include -I/usr/local/include/cairo -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/libpng16 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -fPIC -MD -MT CMakeFiles/filebrowser.dir/src/filebrowser.c.o -MF CMakeFiles/filebrowser.dir/src/filebrowser.c.o.d -o CMakeFiles/filebrowser.dir/src/filebrowser.c.o -c /wrkdirs/usr/ports/x11/rofi-file-browser-extended/work/rofi-file-browser-extended-1.3.1/src/filebrowser.c
/wrkdirs/usr/ports/x11/rofi-file-browser-extended/work/rofi-file-browser-extended-1.3.1/src/filebrowser.c:380:27: error: incompatible function pointer types initializing '_mode_get_icon' (aka 'struct _cairo_surface *(*)(const struct rofi_mode *, unsigned int, unsigned int)') with an expression of type 'cairo_surface_t *(const Mode *, unsigned int, int)' (aka 'struct _cairo_surface *(const struct rofi_mode *, unsigned int, int)') [-Wincompatible-function-pointer-types]
    ._get_icon          = file_browser_get_icon,
                          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

So apply the patch provided at

marvinkreis/rofi-file-browser-extended#49

and used by the Gentoo port too:

https://bugs.gentoo.org/880985

Reported by:	pkg-fallout
@Flowdalic
Copy link
Author

friendly ping

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.

1 participant