From 7c44f807ad902deffc66d1de1e0cc74aef0fa6bb Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 22 Aug 2018 08:29:35 -0700 Subject: [PATCH] Avoid GCC 8 warning "cast between incompatible function types" with -Wextra --- src/gtk/dataview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 71bc42f004..97476600e1 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -74,7 +74,8 @@ public: ~wxGtkTreePathList() { // Delete the list contents, wxGtkList will delete the list itself. - g_list_foreach(m_list, (GFunc)gtk_tree_path_free, NULL); + for (GList* p = m_list; p; p = p->next) + gtk_tree_path_free(static_cast(p->data)); } };