nmcli/connections: fix build with libedit
This has always been broken (libedit-0:3.1-17.20160618cvs.fc26 is too old to work and libedit-0:3.1-20.20170329cvs.fc27.x86_64 has this type mismatch), but new GCC complains (14, 15). ../src/nmcli/connections.c: In function ‘nmcli_editor_tab_completion’: ../src/nmcli/connections.c:6862:64: error: assignment to ‘void (*)(char **, int, int)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types] 6862 | rl_completion_display_matches_hook = uuid_display_hook; | ^ ../src/nmcli/connections.c:6909:60: error: assignment to ‘void (*)(char **, int, int)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types] 6909 | rl_completion_display_matches_hook = uuid_display_hook; | ^ https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2172
This commit is contained in:
@@ -6074,7 +6074,7 @@ finish:
|
||||
/* Functions for readline TAB completion in editor */
|
||||
|
||||
#if HAVE_EDITLINE_READLINE
|
||||
#define uuid_display_hook ((void (*)(void)) NULL)
|
||||
#define uuid_display_hook ((void (*)(char **, int, int)) NULL)
|
||||
#else
|
||||
static void
|
||||
uuid_display_hook(char **array, int len, int max_len)
|
||||
|
Reference in New Issue
Block a user