Fix:core:Fix some warnings
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 7 Jun 2011 19:29:23 +0000 (19:29 +0000)
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 7 Jun 2011 19:29:23 +0000 (19:29 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4517 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/command.c
navit/navit/command.h
navit/navit/gui/qml/gui_qml.cpp
navit/navit/map/garmin/garmin.c
navit/navit/plugin.c
navit/navit/track.c

index 2d68c57..228fcbc 100644 (file)
@@ -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));
index b09cfb9..916071e 100644 (file)
@@ -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);
 };
 
index e00b353..344f0cc 100644 (file)
@@ -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);
 }
 
index de75be6..609bcab 100644 (file)
@@ -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;
index 4a3cc97..7829172 100644 (file)
@@ -328,6 +328,8 @@ plugin_new(struct attr *parent, struct attr **attrs) {
        }
        file_wordexp_destroy(we);
        return pl;
+#else
+    return 0;
 #endif
 }
 
index 464e001..aa92bd0 100644 (file)
@@ -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;