summaryrefslogtreecommitdiff
path: root/navit/map
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@users.noreply.github.com>2019-11-05 12:14:01 +0100
committerjkoan <jkoan@users.noreply.github.com>2019-11-05 12:14:01 +0100
commitfbe6d4cf832a9af1846a75834c8a392eee984cb7 (patch)
tree96164622a1847c3d4c02c450f0fd6c2cbf0ed534 /navit/map
parent39f745bc282c45443deef8e13b381f207207da58 (diff)
downloadnavit-fbe6d4cf832a9af1846a75834c8a392eee984cb7.tar.gz
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
Diffstat (limited to 'navit/map')
-rw-r--r--navit/map/binfile/binfile.c2
-rw-r--r--navit/map/filter/filter.c6
-rw-r--r--navit/map/shapefile/shapefile.c6
-rw-r--r--navit/map/textfile/textfile.c5
4 files changed, 13 insertions, 6 deletions
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c
index 18a4166b1..865e3d72b 100644
--- a/navit/map/binfile/binfile.c
+++ b/navit/map/binfile/binfile.c
@@ -2326,7 +2326,7 @@ static void binmap_search_destroy(struct map_search_priv *ms) {
if (ms->mr)
map_rect_destroy_binfile(ms->mr);
while(ms->boundaries) {
- geom_poly_segment_destroy(ms->boundaries->data);
+ geom_poly_segment_destroy(ms->boundaries->data, NULL);
ms->boundaries=g_list_delete_link(ms->boundaries,ms->boundaries);
}
g_free(ms);
diff --git a/navit/map/filter/filter.c b/navit/map/filter/filter.c
index 8d46db564..c8f4f1029 100644
--- a/navit/map/filter/filter.c
+++ b/navit/map/filter/filter.c
@@ -124,12 +124,14 @@ static enum item_type filter_type(struct map_priv *m, struct item *item) {
return item->type;
}
-static void free_filter_entry(struct filter_entry *filter) {
+/* user_data is for compatibility with GFunc */
+static void free_filter_entry(struct filter_entry *filter, void * user_data) {
g_free(filter->cond_str);
g_free(filter);
}
-static void free_filter(struct filter *filter) {
+/* user_data is for compatibility with GFunc */
+static void free_filter(struct filter *filter, void * user_data) {
g_list_foreach(filter->old, (GFunc)free_filter_entry, NULL);
g_list_free(filter->old);
filter->old=NULL;
diff --git a/navit/map/shapefile/shapefile.c b/navit/map/shapefile/shapefile.c
index df4d64ea5..1031b6903 100644
--- a/navit/map/shapefile/shapefile.c
+++ b/navit/map/shapefile/shapefile.c
@@ -171,7 +171,8 @@ static void longest_match_add_match(struct longest_match *lm, struct longest_mat
lmi->match_idx[lmi->match_idx_count++]=idx;
}
-static void longest_match_item_destroy(struct longest_match_list_item *lmi, long flags) {
+static void longest_match_item_destroy(struct longest_match_list_item *lmi, gpointer p_flags) {
+ long flags = (long) p_flags;
if (!lmi)
return;
if (flags & 2) {
@@ -195,7 +196,8 @@ static struct longest_match_list *longest_match_list_new(struct longest_match *l
return ret;
}
-static void longest_match_list_destroy(struct longest_match_list *lml, long flags) {
+static void longest_match_list_destroy(struct longest_match_list *lml, gpointer p_flags) {
+ long flags = (long) p_flags;
if (!lml)
return;
if (flags & 1) {
diff --git a/navit/map/textfile/textfile.c b/navit/map/textfile/textfile.c
index a7310e224..12381d6c0 100644
--- a/navit/map/textfile/textfile.c
+++ b/navit/map/textfile/textfile.c
@@ -50,7 +50,10 @@ static void get_line(struct map_rect_priv *mr) {
mr->pos=ftell(mr->f);
else
mr->pos+=mr->lastlen;
- fgets(mr->line, TEXTFILE_LINE_SIZE, mr->f);
+ if(fgets(mr->line, TEXTFILE_LINE_SIZE, mr->f) == NULL) {
+ dbg(lvl_error, "Unable to get line (%s)", strerror(errno));
+ mr->line[0]=0;
+ }
dbg(lvl_debug,"read textfile line: %s", mr->line);
remove_comment_line(mr->line);
mr->lastlen=strlen(mr->line)+1;