summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-12-29 12:24:42 +0000
committerhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-12-29 12:24:42 +0000
commitdaa5b46648ed89ede4cf6200680e379a7677a18e (patch)
treee945828195cd190a451918a288a82ba7fef30cc9
parent391cf8092560929bc8c7b27b2bda49d450fbcf2d (diff)
downloadnavit-daa5b46648ed89ede4cf6200680e379a7677a18e.tar.gz
core:fix:fix some warnings
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1872 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/binding/python/navit.c1
-rw-r--r--navit/data/binfile/binfile.c2
-rw-r--r--navit/data/mg/map.c1
-rw-r--r--navit/gui/gtk/datawindow.c4
-rw-r--r--navit/gui/gtk/gui_gtk_statusbar.c7
-rw-r--r--navit/gui/gtk/gui_gtk_window.c2
-rw-r--r--navit/map.c2
-rw-r--r--navit/map.h2
-rw-r--r--navit/maptype.h2
-rw-r--r--navit/navit.c2
-rw-r--r--navit/navit.h2
11 files changed, 12 insertions, 15 deletions
diff --git a/navit/binding/python/navit.c b/navit/binding/python/navit.c
index 34b182370..17f6ecf68 100644
--- a/navit/binding/python/navit.c
+++ b/navit/binding/python/navit.c
@@ -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);
diff --git a/navit/data/binfile/binfile.c b/navit/data/binfile/binfile.c
index 1dc28715e..7a91dcb2f 100644
--- a/navit/data/binfile/binfile.c
+++ b/navit/data/binfile/binfile.c
@@ -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");
diff --git a/navit/data/mg/map.c b/navit/data/mg/map.c
index 160fbbbf9..7e5f8956d 100644
--- a/navit/data/mg/map.c
+++ b/navit/data/mg/map.c
@@ -175,7 +175,6 @@ static int
file_next(struct map_rect_priv *mr)
{
int debug=0;
- enum layer_type layer;
for (;;) {
mr->current_file++;
diff --git a/navit/gui/gtk/datawindow.c b/navit/gui/gtk/datawindow.c
index a18b84593..e3d774595 100644
--- a/navit/gui/gtk/datawindow.c
+++ b/navit/gui/gtk/datawindow.c
@@ -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)
diff --git a/navit/gui/gtk/gui_gtk_statusbar.c b/navit/gui/gtk/gui_gtk_statusbar.c
index 1d70dd5ab..f31cf0786 100644
--- a/navit/gui/gtk/gui_gtk_statusbar.c
+++ b/navit/gui/gtk/gui_gtk_statusbar.c
@@ -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;
diff --git a/navit/gui/gtk/gui_gtk_window.c b/navit/gui/gtk/gui_gtk_window.c
index 159545ce2..07a9538cb 100644
--- a/navit/gui/gtk/gui_gtk_window.c
+++ b/navit/gui/gtk/gui_gtk_window.c
@@ -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);
diff --git a/navit/map.c b/navit/map.c
index 2967a895a..f3d1be2c8 100644
--- a/navit/map.c
+++ b/navit/map.c
@@ -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");
diff --git a/navit/map.h b/navit/map.h
index b2e68d703..a0a926b81 100644
--- a/navit/map.h
+++ b/navit/map.h
@@ -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 */
diff --git a/navit/maptype.h b/navit/maptype.h
index a3f2b240b..7ebf233b6 100644
--- a/navit/maptype.h
+++ b/navit/maptype.h
@@ -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;
diff --git a/navit/navit.c b/navit/navit.c
index 227799946..bf30cd713 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -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;
diff --git a/navit/navit.h b/navit/navit.h
index 617de0ce5..2c0e1be18 100644
--- a/navit/navit.h
+++ b/navit/navit.h
@@ -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_);