summaryrefslogtreecommitdiff
path: root/x11-misc/rofi-file-browser-extended/files/rofi-file-browser-extended-1.3.1-fix-function-pointer-initialization.patch
blob: 0cfff4286608e9530a32d1514d07173d050a54a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 6f62a2d0784a6937d35ac8f6df2e22c23bbfc8f4 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flo@geekplace.eu>
Date: Fri, 11 Nov 2022 15:03:32 +0100
Subject: [PATCH] Fix function pointer initialization

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
--- a/src/filebrowser.c
+++ b/src/filebrowser.c
@@ -263,7 +263,7 @@ static char *file_browser_get_display_value ( const Mode *sw, unsigned int selec
     }
 }
 
-static cairo_surface_t *file_browser_get_icon ( const Mode *sw, unsigned int selected_line, int height )
+static cairo_surface_t *file_browser_get_icon ( const Mode *sw, unsigned int selected_line, unsigned int height )
 {
     FileBrowserModePrivateData *pd = ( FileBrowserModePrivateData * ) mode_get_private_data ( sw );
     FileBrowserFileData *fd = &pd->file_data;