Resolve several "cast between incompatible function types" warnings introduced by gcc8
I don't see a way of creating a merge request in this repo so I will add a proposed patch here as I would do it on bugzilla.
The intention is to resolve the following gcc8 warnings related to "free" functions:
terminal-options.c: In function ‘initial_window_free’:
terminal-options.c:187:29: warning: cast between incompatible function types from ‘void (*)(InitialTab *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
g_list_foreach (iw->tabs, (GFunc) initial_tab_free, NULL);
^
terminal-options.c: In function ‘terminal_options_merge_config’:
terminal-options.c:1219:40: warning: cast between incompatible function types from ‘void (*)(InitialWindow *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
g_list_foreach (initial_windows, (GFunc) initial_window_free, NULL);
^
terminal-options.c: In function ‘terminal_options_free’:
terminal-options.c:1257:45: warning: cast between incompatible function types from ‘void (*)(InitialWindow *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
g_list_foreach (options->initial_windows, (GFunc) initial_window_free, NULL);
^
terminal-screen.c: In function ‘terminal_screen_finalize’:
terminal-screen.c:611:38: warning: cast between incompatible function types from ‘void (*)(TagData *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
g_slist_foreach (priv->match_tags, (GFunc) free_tag_data, NULL);
^
Edited by Igor