diff options
author | Igor Zakharov <f2404@yandex.ru> | 2018-07-16 18:30:34 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2018-07-16 18:30:34 +0200 |
commit | ba024137ae483a8c44716572a17420d841077468 (patch) | |
tree | 4293dfe82ad3b9bc96345a31d505f9349ef2d5f7 | |
parent | 1012b32508331aaf905c3f241f2dd0f90a486c22 (diff) | |
download | gnome-terminal-ba024137ae483a8c44716572a17420d841077468.tar.gz |
Resolve several "cast between incompatible function types" warnings
These warning have been introduced by gcc8.
Resolved by using "g_(s)list_free_full" functions.
Fixes #12
(cherry picked from commit 060e082531d05df084033500206078920420b003)
-rw-r--r-- | src/terminal-options.c | 9 | ||||
-rw-r--r-- | src/terminal-screen.c | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/terminal-options.c b/src/terminal-options.c index 83ead890..8d506d82 100644 --- a/src/terminal-options.c +++ b/src/terminal-options.c @@ -184,8 +184,7 @@ initial_window_new (guint source_tag) static void initial_window_free (InitialWindow *iw) { - g_list_foreach (iw->tabs, (GFunc) initial_tab_free, NULL); - g_list_free (iw->tabs); + g_list_free_full (iw->tabs, (GDestroyNotify) initial_tab_free); g_free (iw->geometry); g_free (iw->role); g_slice_free (InitialWindow, iw); @@ -1216,8 +1215,7 @@ terminal_options_merge_config (TerminalOptions *options, if (have_error) { - g_list_foreach (initial_windows, (GFunc) initial_window_free, NULL); - g_list_free (initial_windows); + g_list_free_full (initial_windows, (GDestroyNotify) initial_window_free); return FALSE; } @@ -1254,8 +1252,7 @@ terminal_options_ensure_window (TerminalOptions *options) void terminal_options_free (TerminalOptions *options) { - g_list_foreach (options->initial_windows, (GFunc) initial_window_free, NULL); - g_list_free (options->initial_windows); + g_list_free_full (options->initial_windows, (GDestroyNotify) initial_window_free); g_free (options->default_role); g_free (options->default_geometry); diff --git a/src/terminal-screen.c b/src/terminal-screen.c index f67f8a2f..e8c1b304 100644 --- a/src/terminal-screen.c +++ b/src/terminal-screen.c @@ -637,8 +637,7 @@ terminal_screen_finalize (GObject *object) g_strfreev (priv->override_command); g_strfreev (priv->initial_env); - g_slist_foreach (priv->match_tags, (GFunc) free_tag_data, NULL); - g_slist_free (priv->match_tags); + g_slist_free_full (priv->match_tags, (GDestroyNotify) free_tag_data); g_free (priv->uuid); |