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 building with GCC 14 on i686 #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

listout
Copy link

@listout listout commented Apr 30, 2024

GCC 14 (and above) have enabled certain compiler flags such as Wincompatible-pointer-types that causes build time errors such as

rofi-file-browser-extended-1.3.1/src/icons.c:52:57: error: passing argument 2 of ‘g_array_steal’ from incompatible pointer type [-Wincompatible-pointer-types]
52 | char** icon_names_raw = g_array_steal ( icon_names, &num_icon_names );
| ^~~~~~~~~~~~~~~
| |
| long unsigned int *
In file included from /usr/include/glib-2.0/glib.h:33,
from /usr/include/glib-2.0/gmodule.h:30,
from /var/tmp/portage/x11-misc/rofi-file-browser-extended-1.3.1-r1/work/rofi-file-browser-extended-1.3.1/src/icons.c:1:
/usr/include/glib-2.0/glib/garray.h:86:54: note: expected ‘gsize *’ {aka ‘unsigned int *’} but argument is of type ‘long unsigned int *’
86 | gsize *len);
| ~~~~~~~~~~~~~~~~~~^~~

My patch attempts to fix this error and some other C99 related warnings. First reported on Gentoo linux, please reffer
https://bugs.gentoo.org/928491 for more details

GCC 14 (and above) have enabled certain compiler flags such as
Wincompatible-pointer-types that causes build time errors such as

rofi-file-browser-extended-1.3.1/src/icons.c:52:57: error: passing argument 2 of ‘g_array_steal’ from incompatible pointer type [-Wincompatible-pointer-types]
   52 |     char** icon_names_raw = g_array_steal ( icon_names, &num_icon_names );
      |                                                         ^~~~~~~~~~~~~~~
      |                                                         |
      |                                                         long unsigned int *
In file included from /usr/include/glib-2.0/glib.h:33,
                 from /usr/include/glib-2.0/gmodule.h:30,
                 from /var/tmp/portage/x11-misc/rofi-file-browser-extended-1.3.1-r1/work/rofi-file-browser-extended-1.3.1/src/icons.c:1:
/usr/include/glib-2.0/glib/garray.h:86:54: note: expected ‘gsize *’ {aka ‘unsigned int *’} but argument is of type ‘long unsigned int *’
   86 |                                    gsize            *len);
      |                                    ~~~~~~~~~~~~~~~~~~^~~

My patch attempts to fix this error and some other C99 related warnings.
First reported on Gentoo linux, please reffer
https://bugs.gentoo.org/928491 for more details

Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
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.

None yet

1 participant