libfm
libfm copied to clipboard
build error with gcc14 -Werror=incompatible-pointer-types
Upcoming gcc14 now defaults to -Werror=incompatible-pointer-types , and compiling libfm git head with gcc14 produces the following errors:
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/exo/exo-icon-view.c: In function ‘exo_icon_view_key_press_event’:
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/exo/exo-icon-view.c:2822:25: error: assignment to ‘GdkWindow *’ {aka ‘struct _GdkDrawable *’} from incompatible pointer type ‘GObject *’ {aka ‘struct _GObject *’} [-Werror=incompatible-pointer-types]
2822 | new_event->key.window = g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry)));
| ^
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/exo/exo-icon-view.c: In function ‘exo_icon_view_rows_reordered’:
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/exo/exo-icon-view.c:4608:38: warning: ‘*list_array’ may be used uninitialized [-Wmaybe-uninitialized]
4608 | icon_view->priv->items = list_array[0];
| ~~~~~~~~~~^~~
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/fm-dnd-dest.c: In function ‘_ask_action_on_drop’:
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/fm-dnd-dest.c:461:13: error: assignment to ‘GtkMenu *’ {aka ‘struct _GtkMenu *’} from incompatible pointer type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} [-Werror=incompatible-pointer-types]
461 | ri.menu = g_object_ref(gtk_ui_manager_get_widget(ui, "/popup"));
| ^
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/fm-standard-view.c: In function ‘create_icon_view’:
/buildroot/libfm-1.3.2/_BUILDDIR_gtk2/../src/gtk/fm-standard-view.c:640:23: error: assignment to ‘FmCellRendererText *’ {aka ‘struct _FmCellRendererText *’} from incompatible pointer type ‘GtkCellRenderer *’ {aka ‘struct _GtkCellRenderer *’} [-Werror=incompatible-pointer-types]
640 | fv->renderer_text = g_object_ref_sink(render);
| ^