diff options
author | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-04-27 14:37:54 +0000 |
---|---|---|
committer | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-04-27 14:37:54 +0000 |
commit | 1eb030e6772ba32632a1d9703694f361b8d52f95 (patch) | |
tree | bdc2995242e6393bd4554563ac240352794630a2 /navit | |
parent | 85ec0e38a2387b19b7d8d6caf0897d7b64286da0 (diff) | |
download | navit-1eb030e6772ba32632a1d9703694f361b8d52f95.tar.gz |
Fix:Core:Fix some more warnings
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2239 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/binding/dbus/binding_dbus.c | 11 | ||||
-rw-r--r-- | navit/font/freetype/font_freetype.c | 1 | ||||
-rw-r--r-- | navit/gui/internal/gui_internal.c | 20 | ||||
-rw-r--r-- | navit/main.h | 1 | ||||
-rw-r--r-- | navit/map/shapefile/shapefile.c | 1 |
5 files changed, 16 insertions, 18 deletions
diff --git a/navit/binding/dbus/binding_dbus.c b/navit/binding/dbus/binding_dbus.c index fc036c21f..09d606c9d 100644 --- a/navit/binding/dbus/binding_dbus.c +++ b/navit/binding/dbus/binding_dbus.c @@ -484,7 +484,7 @@ static DBusHandlerResult request_navit_get_attr(DBusConnection *connection, DBusMessage *message) { struct navit *navit; - DBusMessageIter iter, response; + DBusMessageIter iter; char * attr_type = NULL; struct attr attr; navit = object_get_from_message(message, "navit"); @@ -590,22 +590,22 @@ request_navit_set_attr(DBusConnection *connection, DBusMessage *message) if (attr.type > attr_type_item_begin && attr.type < attr_type_item_end) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - else if (attr.type > attr_type_int_begin && attr.type < attr_type_boolean_begin) + else if (attr.type > attr_type_int_begin && attr.type < attr_type_boolean_begin) { if (dbus_message_iter_get_arg_type(&iterattr) == DBUS_TYPE_INT32) { dbus_message_iter_get_basic(&iterattr, &attr.u.num); if (navit_set_attr(navit, &attr)) return empty_reply(connection, message); } - - else if(attr.type > attr_type_boolean_begin && attr.type < attr_type_int_end) + } + else if(attr.type > attr_type_boolean_begin && attr.type < attr_type_int_end) { if (dbus_message_iter_get_arg_type(&iterattr) == DBUS_TYPE_BOOLEAN) { dbus_message_iter_get_basic(&iterattr, &attr.u.num); if (navit_set_attr(navit, &attr)) return empty_reply(connection, message); } - + } #if 0 else if(attr.type > attr_type_string_begin && attr.type < attr_type_string_end) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; @@ -688,7 +688,6 @@ request_navit_set_destination(DBusConnection *connection, DBusMessage *message) static DBusHandlerResult request_navit_evaluate(DBusConnection *connection, DBusMessage *message) { - struct pcoord pc; struct navit *navit; char *command; char *result; diff --git a/navit/font/freetype/font_freetype.c b/navit/font/freetype/font_freetype.c index 20f10522b..1dbdd09e7 100644 --- a/navit/font/freetype/font_freetype.c +++ b/navit/font/freetype/font_freetype.c @@ -336,7 +336,6 @@ font_freetype_font_new(struct graphics_priv *gr, *meth = font_methods; int exact, found=0; - char *name; char **family; #if USE_CACHING char *idstr; diff --git a/navit/gui/internal/gui_internal.c b/navit/gui/internal/gui_internal.c index 928bad0b2..d80450ef8 100644 --- a/navit/gui/internal/gui_internal.c +++ b/navit/gui/internal/gui_internal.c @@ -415,12 +415,13 @@ image_new_scaled(struct gui_priv *this, char *name, int w, int h) return NULL; } - +#if 0 static struct graphics_image * image_new_o(struct gui_priv *this, char *name) { return image_new_scaled(this, name, -1, -1); } +#endif static struct graphics_image * image_new_xs(struct gui_priv *this, char *name) @@ -711,6 +712,7 @@ gui_internal_button_new(struct gui_priv *this, char *text, struct graphics_image return gui_internal_button_new_with_callback(this, text, image, flags, NULL, NULL); } +#if 0 //############################################################################################################## //# Description: //# Comment: @@ -724,6 +726,7 @@ static void gui_internal_clear(struct gui_priv *this) pnt.y=0; graphics_draw_rectangle(gra, this->background, &pnt, this->root.w, this->root.h); } +#endif static struct widget * gui_internal_find_widget(struct widget *wi, struct point *p, int flags) @@ -1419,10 +1422,7 @@ gui_internal_top_bar(struct gui_priv *this) static struct widget * gui_internal_time_help(struct gui_priv *this) { - struct widget *w,*wm,*wh,*wc,*wcn; - int dots_len, sep_len; - GList *res=NULL,*l; - int width,width_used=0,use_sep,incomplete=0; + struct widget *w,*wc,*wcn; char timestr[64]; struct tm *tm; time_t timep; @@ -1586,7 +1586,7 @@ gui_internal_menu(struct gui_priv *this, char *label) w->w=menu->w; gui_internal_widget_append(menu, w); if (this->flags & 16) { - struct widget *wl,*wlb,*wb,*wm=w; + struct widget *wlb,*wb,*wm=w; wm->flags=gravity_center|orientation_vertical|flags_expand|flags_fill; w=gui_internal_box_new(this, gravity_center|orientation_horizontal|flags_expand|flags_fill); dbg(0,"topbox->menu_data=%p\n", topbox->menu_data); @@ -3488,8 +3488,6 @@ static int gui_internal_set_graphics(struct gui_priv *this, struct graphics *gra struct window *win; struct color cbh={0x9fff,0x9fff,0x9fff,0xffff}; struct color cf={0xbfff,0xbfff,0xbfff,0xffff}; - struct color cw={0xffff,0xffff,0xffff,0xffff}; - struct color cbl={0x0000,0x0000,0x0000,0xffff}; struct transformation *trans=navit_get_trans(this->nav); win=graphics_get_data(gra, "window"); @@ -3639,9 +3637,9 @@ static struct gui_internal_widget_methods gui_internal_widget_methods = { }; static struct command_table commands[] = { - {"menu",gui_internal_cmd_menu2}, - {"fullscreen",gui_internal_cmd_fullscreen}, - {"get_data",gui_internal_get_data}, + {"menu",command_cast(gui_internal_cmd_menu2)}, + {"fullscreen",command_cast(gui_internal_cmd_fullscreen)}, + {"get_data",command_cast(gui_internal_get_data)}, }; diff --git a/navit/main.h b/navit/main.h index f39e8e270..4c631fe3c 100644 --- a/navit/main.h +++ b/navit/main.h @@ -23,6 +23,7 @@ /* prototypes */ struct navit; struct iter; +struct attr; struct iter * main_iter_new(void); void main_iter_destroy(struct iter *iter); struct navit * main_get_navit(struct iter *iter); diff --git a/navit/map/shapefile/shapefile.c b/navit/map/shapefile/shapefile.c index f2180ef41..b08273c37 100644 --- a/navit/map/shapefile/shapefile.c +++ b/navit/map/shapefile/shapefile.c @@ -22,6 +22,7 @@ #include <stdio.h> #include <string.h> #include <math.h> +#include <unistd.h> #include "config.h" #include "debug.h" #include "plugin.h" |