mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-15 18:46:38 +02:00
21 lines
1.3 KiB
Diff
21 lines
1.3 KiB
Diff
Fix -Wincompatible-pointer-types error with gcc 14.
|
|
|
|
```
|
|
[ 50%] Building C object CMakeFiles/jsonmenu.dir/src/jsonmenu.c.o
|
|
/home/buildozer/aports/testing/rofi-json-menu/src/rofi-json-menu-0.2.0/src/jsonmenu.c:313:27: error: initialization of 'cairo_surface_t * (*)(const Mode *, unsigned int, unsigned int)' {aka 'struct _cairo_surface * (*)(const struct rofi_mode *, unsigned int, unsigned int)'} from incompatible pointer type 'cairo_surface_t * (*)(const Mode *, unsigned int, int)' {aka 'struct _cairo_surface * (*)(const struct rofi_mode *, unsigned int, int)'} [-Wincompatible-pointer-types]
|
|
313 | ._get_icon = json_menu_get_icon,
|
|
| ^~~~~~~~~~~~~~~~~~
|
|
/home/buildozer/aports/testing/rofi-json-menu/src/rofi-json-menu-0.2.0/src/jsonmenu.c:313:27: note: (near initialization for 'mode._get_icon')
|
|
```
|
|
|
|
--- rofi-json-menu-0.2.0-origin/src/jsonmenu.c
|
|
+++ rofi-json-menu-0.2.0/src/jsonmenu.c
|
|
@@ -222,7 +222,7 @@
|
|
return entry->name;
|
|
}
|
|
|
|
-static cairo_surface_t* json_menu_get_icon ( const Mode* sw, unsigned int selected_line, int height )
|
|
+static cairo_surface_t* json_menu_get_icon ( const Mode* sw, unsigned int selected_line, unsigned int height )
|
|
{
|
|
JsonMenuModePrivateData* pd = ( JsonMenuModePrivateData * ) mode_get_private_data ( sw );
|
|
Entry *entry = &pd->entries[selected_line];
|