core:fix:fix some warnings
authorhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Dec 2008 12:24:42 +0000 (12:24 +0000)
committerhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Dec 2008 12:24:42 +0000 (12:24 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@1872 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/binding/python/navit.c
navit/data/binfile/binfile.c
navit/data/mg/map.c
navit/gui/gtk/datawindow.c
navit/gui/gtk/gui_gtk_statusbar.c
navit/gui/gtk/gui_gtk_window.c
navit/map.c
navit/map.h
navit/maptype.h
navit/navit.c
navit/navit.h

index 34b1823..17f6ecf 100644 (file)
@@ -76,7 +76,6 @@ navit_set_position_py(navitObject *self, PyObject *args)
 static PyObject *
 navit_zoom_to_route_py(navitObject *self, PyObject *args)
 {
-       PyObject *pcoord;
        if (!PyArg_ParseTuple(args, ""))
                return NULL;
        navit_zoom_to_route(self->navit);
index 1dc2871..7a91dcb 100644 (file)
@@ -472,7 +472,7 @@ static struct map_rect_priv *
 map_rect_new_binfile(struct map_priv *map, struct map_selection *sel)
 {
        struct map_rect_priv *mr;
-       struct tile t;
+       struct tile t={};
 
        binfile_check_version(map);
        dbg(1,"map_rect_new_binfile\n");
index 160fbbb..7e5f895 100644 (file)
@@ -175,7 +175,6 @@ static int
 file_next(struct map_rect_priv *mr)
 {
        int debug=0;
-       enum layer_type layer;
 
        for (;;) {
                mr->current_file++;
index a18b845..e3d7745 100644 (file)
@@ -142,7 +142,7 @@ gui_gtk_datawindow_delete(GtkWidget *widget, GdkEvent *event, struct datawindow_
        return FALSE;
 }
 
-void
+static void
 gui_gtk_datawindow_destroy(struct datawindow_priv *win)
 {
        if ((!win->gui) || (!win->gui->datawindow)) {
@@ -156,11 +156,13 @@ gui_gtk_datawindow_destroy(struct datawindow_priv *win)
        return;
 }
 
+#if 0
 void
 gui_gtk_datawindow_set_button(struct datawindow_priv *this_, GtkWidget *btn)
 {
        this_->button = btn;
 }
+#endif
 
 static gboolean
 keypress(GtkWidget *widget, GdkEventKey *event, struct datawindow_priv *win)
index 1d70dd5..f31cf07 100644 (file)
@@ -45,9 +45,7 @@ struct statusbar_priv {
        struct callback *vehicle_cb;
 };
 
-
-
-
+#if 0
 static void
 statusbar_destroy(struct statusbar_priv *this)
 {
@@ -68,6 +66,7 @@ statusbar_gps_update(struct statusbar_priv *this, int sats, int qual, double lng
        gtk_label_set_text(GTK_LABEL(this->gps), this->gps_text);
 
 }
+#endif
 
 static char *status_fix2str(int type)
 {
@@ -94,7 +93,7 @@ statusbar_route_update(struct statusbar_priv *this, struct navit *navit, struct
        char buffer[128];
        double lng, lat, direction=0, height=0, speed=0, hdop=0;
        int sats=0, qual=0;
-       int status;
+       int status=0;
        char *dirs[]={_("N"),_("NE"),_("E"),_("SE"),_("S"),_("SW"),_("W"),_("NW"),_("N")};
        char *dir;
        int dir_idx;
index 159545c..07a9538 100644 (file)
@@ -147,7 +147,6 @@ keypress(GtkWidget *widget, GdkEventKey *event, struct gui_priv *this)
                struct coord *p;
                struct pcoord pc;
                t=navit_get_trans(this->nav);
-               struct coord *c=transform_center(t);
                p=transform_center(t);
                pc.pro=projection_mg;
                p->y+=50*cos(transform_get_yaw(t)*M_PI/180);
@@ -162,7 +161,6 @@ keypress(GtkWidget *widget, GdkEventKey *event, struct gui_priv *this)
                struct coord *p;
                struct pcoord pc;
                t=navit_get_trans(this->nav);
-               struct coord *c=transform_center(t);
                p=transform_center(t);
                pc.pro=projection_mg;
                p->y-=50*cos(transform_get_yaw(t)*M_PI/180);
index 2967a89..f3d1be2 100644 (file)
@@ -659,7 +659,7 @@ map_dump_filedesc(struct map *map, FILE *out)
 }
 
 void
-map_dump_file(struct map *map, char *file)
+map_dump_file(struct map *map, const char *file)
 {
        FILE *f;
        f=fopen(file,"w");
index b2e68d7..a0a926b 100644 (file)
@@ -253,7 +253,7 @@ int map_selection_contains_item_range(struct map_selection *sel, int follow, str
 int map_selection_contains_item(struct map_selection *sel, int follow, enum item_type type);
 int map_priv_is(struct map *map, struct map_priv *priv);
 void map_dump_filedesc(struct map *map, FILE *out);
-void map_dump_file(struct map *map, char *file);
+void map_dump_file(struct map *map, const char *file);
 void map_dump(struct map *map);
 /* end of prototypes */
 
index a3f2b24..7ebf233 100644 (file)
@@ -21,6 +21,7 @@
 #define NAVIT_MAPTYPE_H
 
 struct map_methods;
+enum projection;
 
 struct maptype {
        char *name;
@@ -29,7 +30,6 @@ struct maptype {
 };
 
 /* prototypes */
-enum projection;
 struct map_methods;
 struct map_priv;
 struct maptype;
index 2277999..bf30cd7 100644 (file)
@@ -836,7 +836,7 @@ navit_write_center_to_file(struct navit *this_, char *file)
  * @returns nothing
  */
 void
-navit_set_destination(struct navit *this_, struct pcoord *c, char *description)
+navit_set_destination(struct navit *this_, struct pcoord *c, const char *description)
 {
        if (c) {
                this_->destination=*c;
index 617de0c..2c0e1be 100644 (file)
@@ -62,7 +62,7 @@ void navit_zoom_in(struct navit *this_, int factor, struct point *p);
 void navit_zoom_out(struct navit *this_, int factor, struct point *p);
 struct navit *navit_new(struct attr *parent, struct attr **attrs);
 struct graphics *navit_get_graphics(struct navit *this_);
-void navit_set_destination(struct navit *this_, struct pcoord *c, char *description);
+void navit_set_destination(struct navit *this_, struct pcoord *c, const char *description);
 void navit_add_bookmark(struct navit *this_, struct pcoord *c, const char *description);
 void navit_say(struct navit *this_, char *text);
 void navit_speak(struct navit *this_);