From fbe6d4cf832a9af1846a75834c8a392eee984cb7 Mon Sep 17 00:00:00 2001 From: Stefan Wildemann Date: Tue, 5 Nov 2019 12:14:01 +0100 Subject: fix:various:fix compiler warnings (#940) * fix:core:build without warnings on my setup navit_core build without non avoidable warnings. * fix:dbus:fix compiler warnings * fix:gui/internal: remov compiler warnings * fix:various:remove compiler warnings * fix:various remove compiler warnings. * fix:various: fix android compiler warnings --- navit/maptool/osm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'navit/maptool') diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index c6308c2b4..ddf4e99a1 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -2592,6 +2592,11 @@ static void process_associated_streets_setup(FILE *in, struct relations *relatio relations_add_relation_default_entry(relations, relations_func); } +/* to adapt g_free to GFunc */ +static void g_free_helper(void * data, void * user_data) { + g_free(data); +} + void process_associated_streets(FILE *in, struct files_relation_processing *files_relproc) { struct relations *relations=relations_new(); struct process_relation_member_func_priv fp= {NULL,NULL}; @@ -2618,7 +2623,7 @@ void process_associated_streets(FILE *in, struct files_relation_processing *file } relations_destroy(relations); - g_list_foreach(fp.allocations, (GFunc)free, NULL); + g_list_foreach(fp.allocations, (GFunc)g_free_helper, NULL); g_list_free(fp.allocations); } @@ -2674,7 +2679,7 @@ void process_house_number_interpolations(FILE *in, struct files_relation_process } relations_destroy(relations); - g_list_foreach(fp.allocations, (GFunc)free, NULL); + g_list_foreach(fp.allocations, (GFunc)g_free_helper, NULL); g_list_free(fp.allocations); } -- cgit v1.2.1