summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Zakharov <f2404@yandex.ru>2018-07-16 18:28:44 +0200
committerChristian Persch <chpe@src.gnome.org>2018-07-16 18:28:44 +0200
commit060e082531d05df084033500206078920420b003 (patch)
tree9f61c3e557eebdc51d0949aedd09ecc033468f81
parent35485658103da87db37f5cedfd923c34f7ac1801 (diff)
downloadgnome-terminal-060e082531d05df084033500206078920420b003.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
-rw-r--r--src/terminal-options.c9
-rw-r--r--src/terminal-screen.c3
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 ed939b23..074c6f78 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -608,8 +608,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);