From c1896c9cf6646931af19d70bfe6742b4f8ac0f23 Mon Sep 17 00:00:00 2001 From: horwitz Date: Mon, 3 Sep 2007 07:43:16 +0000 Subject: [PATCH] Fix some warnings git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@404 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/src/graphics.h | 2 ++ navit/src/navit.h | 3 +++ navit/src/osd/core/osd_core.c | 3 ++- navit/src/vehicle.h | 3 ++- navit/src/xmlconfig.c | 8 ++++---- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/navit/src/graphics.h b/navit/src/graphics.h index fbf2c4f..5c2fc37 100644 --- a/navit/src/graphics.h +++ b/navit/src/graphics.h @@ -96,6 +96,7 @@ struct point; struct route; struct transformation; struct graphics *graphics_new(const char *type, struct attr **attrs); +struct graphics * graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h); void graphics_init(struct graphics *this_); void *graphics_get_data(struct graphics *this_, char *type); void graphics_register_resize_callback(struct graphics *this_, void (*callback)(void *data, int w, int h), void *data); @@ -111,6 +112,7 @@ void graphics_draw_restore(struct graphics *this_, struct point *p, int w, int h void graphics_draw_mode(struct graphics *this_, enum draw_mode_num mode); void graphics_draw_lines(struct graphics *this_, struct graphics_gc *gc, struct point *p, int count); void graphics_draw_circle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int r); +void graphics_draw_rectangle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int w, int h); void display_add(struct displaylist *displaylist, struct item *item, int count, struct point *pnt, char *label); int graphics_ready(struct graphics *this_); void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans, GList *layouts, struct route *route); diff --git a/navit/src/navit.h b/navit/src/navit.h index fc22cdf..74d5802 100644 --- a/navit/src/navit.h +++ b/navit/src/navit.h @@ -34,6 +34,7 @@ void navit_zoom_out(struct navit *this_, int factor); struct navit *navit_new(struct coord *center, enum projection pro, int zoom); void navit_set_gui(struct navit *this_, struct gui *gui); void navit_set_graphics(struct navit *this_, struct graphics *gra); +struct graphics * navit_get_graphics(struct navit *this_); void navit_set_destination(struct navit *this_, struct coord *c, char *description); void navit_add_bookmark(struct navit *this_, struct coord *c, char *description); void navit_add_menu_layouts(struct navit *this_, struct menu *men); @@ -62,6 +63,8 @@ void navit_set_position(struct navit *this_, struct coord *c); struct navit_vehicle *navit_add_vehicle(struct navit *this_, struct vehicle *v, const char *name, struct color *c, int update, int follow); void navit_add_vehicle_cb(struct navit *this_, struct callback *cb); void navit_remove_vehicle_cb(struct navit *this_, struct callback *cb); +void navit_add_init_cb(struct navit *this_, struct callback *cb); +void navit_remove_init_cb(struct navit *this_, struct callback *cb); void navit_set_vehicle(struct navit *this_, struct navit_vehicle *nv); void navit_tracking_add(struct navit *this_, struct tracking *tracking); void navit_route_add(struct navit *this_, struct route *route); diff --git a/navit/src/osd/core/osd_core.c b/navit/src/osd/core/osd_core.c index 7afa464..27c5650 100644 --- a/navit/src/osd/core/osd_core.c +++ b/navit/src/osd/core/osd_core.c @@ -12,6 +12,7 @@ #include "debug.h" #include "callback.h" #include "color.h" +#include "vehicle.h" struct compass { struct point p; @@ -138,7 +139,7 @@ osd_compass_init(struct compass *this, struct navit *nav) osd_compass_draw(this, NULL); } -struct osd_priv * +static struct osd_priv * osd_compass_new(struct navit *nav, struct osd_methods *meth, struct attr **attrs) { struct compass *this=g_new0(struct compass, 1); diff --git a/navit/src/vehicle.h b/navit/src/vehicle.h index cec55a7..f830c4d 100644 --- a/navit/src/vehicle.h +++ b/navit/src/vehicle.h @@ -17,4 +17,5 @@ void vehicle_destroy(struct vehicle *this_); /* end of prototypes */ #ifdef __cplusplus } -#endif \ No newline at end of file +#endif + diff --git a/navit/src/xmlconfig.c b/navit/src/xmlconfig.c index 6e1b79a..deba3dc 100644 --- a/navit/src/xmlconfig.c +++ b/navit/src/xmlconfig.c @@ -277,7 +277,7 @@ xmlconfig_window_items(struct xmlstate *state) const char *name=find_attribute(state, "name", 1); const char *value=find_attribute(state, "distance", 0); const char *type=find_attribute(state, "type", 1); - char *tok,*str,*type_str,*saveptr; + char *tok,*str,*type_str,*saveptr=NULL; if (! name || !type) return 0; if (value) @@ -321,7 +321,7 @@ xmlconfig_speed(struct xmlstate *state) const char *value; int v; enum item_type itype; - char *saveptr, *tok, *type_str, *str; + char *saveptr=NULL, *tok, *type_str, *str; type=find_attribute(state, "type", 1); if (! type) @@ -371,7 +371,7 @@ xmlconfig_announce(struct xmlstate *state) int level[3]; int i; enum item_type itype; - char *saveptr, *tok, *type_str, *str; + char *saveptr=NULL, *tok, *type_str, *str; type=find_attribute(state, "type", 1); if (! type) @@ -457,7 +457,7 @@ xmlconfig_item(struct xmlstate *state) const char *type=find_attribute(state, "type", 1); int min, max; enum item_type itype; - char *saveptr, *tok, *type_str, *str; + char *saveptr=NULL, *tok, *type_str, *str; if (! type) return 0; -- 2.7.4