cleanup: Cast g_hash_table_lookup return to function pointer
Explicitly cast the void pointer returned by g_hash_table_lookup to the expected function pointer signature. Make `-Wpedantic` happy.
This commit is contained in:
@@ -1863,7 +1863,8 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
}
|
}
|
||||||
parsed[i] = '\0';
|
parsed[i] = '\0';
|
||||||
|
|
||||||
char* (*ac_func)(ProfWin*, const char* const, gboolean) = g_hash_table_lookup(ac_funcs, parsed);
|
char* (*ac_func)(ProfWin*, const char* const, gboolean) = (char* (*)(ProfWin*, const char* const, gboolean))g_hash_table_lookup(ac_funcs, parsed);
|
||||||
|
|
||||||
if (ac_func) {
|
if (ac_func) {
|
||||||
result = ac_func(window, input, previous);
|
result = ac_func(window, input, previous);
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user