rofi-file-browser-extended-1.3.1-fix-function-pointer-initialization.patch 1.2 KB

123456789101112131415161718192021222324
  1. From 6f62a2d0784a6937d35ac8f6df2e22c23bbfc8f4 Mon Sep 17 00:00:00 2001
  2. From: Florian Schmaus <flo@geekplace.eu>
  3. Date: Fri, 11 Nov 2022 15:03:32 +0100
  4. Subject: [PATCH] Fix function pointer initialization
  5. Fix
  6. 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]
  7. ._get_icon = file_browser_get_icon,
  8. ^~~~~~~~~~~~~~~~~~~~~
  9. See also https://bugs.gentoo.org/880985
  10. --- a/src/filebrowser.c
  11. +++ b/src/filebrowser.c
  12. @@ -263,7 +263,7 @@ static char *file_browser_get_display_value ( const Mode *sw, unsigned int selec
  13. }
  14. }
  15. -static cairo_surface_t *file_browser_get_icon ( const Mode *sw, unsigned int selected_line, int height )
  16. +static cairo_surface_t *file_browser_get_icon ( const Mode *sw, unsigned int selected_line, unsigned int height )
  17. {
  18. FileBrowserModePrivateData *pd = ( FileBrowserModePrivateData * ) mode_get_private_data ( sw );
  19. FileBrowserFileData *fd = &pd->file_data;