From 092564a336118606e3ee4f41e27ec440aa32b88f Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 2 May 2018 18:34:00 +0200 Subject: [PATCH] prefs.c: fix compilation with gcc 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] Change-Id: Id9f791c78e45d2373c3c1ce57059ef1e973a2fb1 hange-Id: I25597a730efcd580a1dd327d4fc38ab940a8b4d8 Reviewed-on: https://code.wireshark.org/review/27263 Reviewed-by: Anders Broman --- epan/prefs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/epan/prefs.c b/epan/prefs.c index c7e8ba808d..1505417400 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -3754,9 +3754,7 @@ char *join_string_list(GList *sl) void prefs_clear_string_list(GList *sl) { - /* g_list_free_full() only exists since 2.28. */ - g_list_foreach(sl, (GFunc)g_free, NULL); - g_list_free(sl); + g_list_free_full(sl, g_free); } /*