From 23b423d73c40c4bed3a62e9cbeedb6fd46e5af83 Mon Sep 17 00:00:00 2001 From: rikky Date: Tue, 7 Jun 2011 19:29:23 +0000 Subject: [PATCH] Fix:core:Fix some warnings git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4517 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/command.c | 2 +- navit/navit/command.h | 2 +- navit/navit/gui/qml/gui_qml.cpp | 2 -- navit/navit/map/garmin/garmin.c | 4 ++-- navit/navit/plugin.c | 2 ++ navit/navit/track.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/navit/navit/command.c b/navit/navit/command.c index 2d68c57..228fcbc 100644 --- a/navit/navit/command.c +++ b/navit/navit/command.c @@ -855,7 +855,7 @@ command_evaluate(struct attr *attr, const char *expr) * expr which may be freed when the calling widget is destroyed by a * subsequent command call. Hence the g_strdup. */ - const char *expr_dup; + char *expr_dup; struct result res; struct context ctx; memset(&res, 0, sizeof(res)); diff --git a/navit/navit/command.h b/navit/navit/command.h index b09cfb9..916071e 100644 --- a/navit/navit/command.h +++ b/navit/navit/command.h @@ -25,7 +25,7 @@ extern "C" { #endif struct command_table { - char *command; + const char *command; int (*func)(void *data, char *cmd, struct attr **in, struct attr ***out); }; diff --git a/navit/navit/gui/qml/gui_qml.cpp b/navit/navit/gui/qml/gui_qml.cpp index e00b353..344f0cc 100644 --- a/navit/navit/gui/qml/gui_qml.cpp +++ b/navit/navit/gui/qml/gui_qml.cpp @@ -396,8 +396,6 @@ struct gui_methods gui_qml_methods = { static void gui_qml_command(struct gui_priv *this_, char *function, struct attr **in, struct attr ***out, int *valid) { - struct attr **curr=in; - struct attr *attr; this_->guiProxy->processCommand(function); } diff --git a/navit/navit/map/garmin/garmin.c b/navit/navit/map/garmin/garmin.c index de75be6..609bcab 100644 --- a/navit/navit/map/garmin/garmin.c +++ b/navit/navit/map/garmin/garmin.c @@ -919,11 +919,11 @@ static struct map_methods map_methods = { gmap_rect_get_item_byid, gmap_search_new, gmap_search_destroy, - gmap_rect_get_item, + NULL, }; static struct map_priv * -gmap_new(struct map_methods *meth, struct attr **attrs) +gmap_new(struct map_methods *meth, struct attr **attrs, struct callback_list *cbl) { struct map_priv *m; struct attr *data; diff --git a/navit/navit/plugin.c b/navit/navit/plugin.c index 4a3cc97..7829172 100644 --- a/navit/navit/plugin.c +++ b/navit/navit/plugin.c @@ -328,6 +328,8 @@ plugin_new(struct attr *parent, struct attr **attrs) { } file_wordexp_destroy(we); return pl; +#else + return 0; #endif } diff --git a/navit/navit/track.c b/navit/navit/track.c index 464e001..aa92bd0 100644 --- a/navit/navit/track.c +++ b/navit/navit/track.c @@ -625,7 +625,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v int i,value,min,time; struct coord lpnt; struct coord cin; - struct attr valid,speed_attr,direction_attr,coord_geo,lag,time_attr,static_speed,static_distance,fix_type; + struct attr valid,speed_attr,direction_attr,coord_geo,lag,time_attr,static_speed,static_distance; double speed, direction; if (v) tr->vehicle=v; -- 2.7.4