Fix:Core:Fix some compile warnings
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 6 Nov 2008 21:46:19 +0000 (21:46 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 6 Nov 2008 21:46:19 +0000 (21:46 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1663 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/attr.c
navit/navit/attr.h
navit/navit/debug.c
navit/navit/file.h
navit/navit/graphics.h
navit/navit/maptype.c
navit/navit/navit.h
navit/navit/plugin.c
navit/navit/route.c
navit/navit/transform.h

index 2caa09c..c3e9ee9 100644 (file)
@@ -74,7 +74,7 @@ attr_new_from_text(const char *name, const char *value)
        struct attr *ret;
        struct coord_geo *g;
        struct coord c;
-       char *pos,*type_str,*str,*tok,*saveptr;
+       char *pos,*type_str,*str,*tok,*saveptr=NULL;
        int min,max,count;
 
        ret=g_new0(struct attr, 1);
index 2d1cf93..a29972f 100644 (file)
@@ -105,6 +105,7 @@ char *attr_to_text(struct attr *attr, struct map *map, int pretty);
 struct attr *attr_search(struct attr **attrs, struct attr *last, enum attr_type attr);
 int attr_generic_get_attr(struct attr **attrs, struct attr **def_attrs, enum attr_type type, struct attr *attr, struct attr_iter *iter);
 struct attr **attr_generic_set_attr(struct attr **attrs, struct attr *attr);
+struct attr **attr_generic_add_attr(struct attr **attrs, struct attr *attr);
 int attr_data_size(struct attr *attr);
 void *attr_data_get(struct attr *attr);
 void attr_data_set(struct attr *attr, void *data);
index 37b22f0..972fc0c 100644 (file)
@@ -36,7 +36,7 @@
 int debug_level=0,segv_level=0;
 static int dummy;
 static GHashTable *debug_hash;
-static char *gdb_program;
+static const char *gdb_program;
 
 static FILE *debug_fp;
 
@@ -44,6 +44,7 @@ static void sigsegv(int sig)
 {
 #if defined(_WIN32) || defined(__CEGCC__)
 #else
+#include <unistd.h>
        char buffer[256];
        if (segv_level > 1)
                sprintf(buffer, "gdb -ex bt %s %d", gdb_program, getpid());
index 5842b88..7c811aa 100644 (file)
@@ -72,6 +72,7 @@ char **file_wordexp_get_array(struct file_wordexp *wexp);
 void file_wordexp_destroy(struct file_wordexp *wexp);
 int file_get_param(struct file *file, struct param_list *param, int count);
 int file_version(struct file *file, int byname);
+void *file_get_os_handle(struct file *file);
 void file_init(void);
 /* end of prototypes */
 
index a168d6f..2370461 100644 (file)
@@ -121,6 +121,7 @@ struct layout;
 struct point;
 struct transformation;
 struct callback;
+struct itemgra;
 struct graphics *graphics_new(struct attr *parent, struct attr **attrs);
 int graphics_get_attr(struct graphics *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
 struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h, int alpha);
@@ -136,6 +137,7 @@ void graphics_gc_set_background(struct graphics_gc *gc, struct color *c);
 void graphics_gc_set_linewidth(struct graphics_gc *gc, int width);
 void graphics_gc_set_dashes(struct graphics_gc *gc, int width, int offset, unsigned char dash_list[], int n);
 struct graphics_image * graphics_image_new_scaled(struct graphics *gra, char *path, int w, int h);
+struct graphics_image * graphics_image_new_scaled_rotated(struct graphics *gra, char *path, int w, int h, int rotate);
 struct graphics_image *graphics_image_new(struct graphics *gra, char *path);
 void graphics_image_free(struct graphics *gra, struct graphics_image *img);
 void graphics_draw_restore(struct graphics *this_, struct point *p, int w, int h);
@@ -153,6 +155,7 @@ void display_add(struct displaylist *displaylist, struct item *item, int count,
 int graphics_ready(struct graphics *this_);
 void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans, struct layout *l, int callback);
 void graphics_displaylist_move(struct displaylist *displaylist, int dx, int dy);
+void graphics_draw_itemgra(struct graphics *gra, struct itemgra *itm, struct transformation *t);
 void graphics_draw(struct graphics *gra, struct displaylist *displaylist, GList *mapsets, struct transformation *trans, struct layout *l);
 struct displaylist_handle *graphics_displaylist_open(struct displaylist *displaylist);
 struct displayitem *graphics_displaylist_next(struct displaylist_handle *dlh);
index 9e577f5..eb4c163 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <glib.h>
+#include "debug.h"
 #include "projection.h"
 #include "map.h"
 #include "maptype.h"
index 82cb04e..edaf0f9 100644 (file)
@@ -55,6 +55,7 @@ int navit_get_width(struct navit *this_);
 int navit_check_route(struct navit *this_);
 int navit_get_height(struct navit *this_);
 void navit_ignore_button(struct navit *this_);
+void navit_ignore_graphics_events(struct navit *this_, int ignore);
 int navit_handle_button(struct navit *this_, int pressed, int button, struct point *p, struct callback *popup_callback);
 void navit_handle_motion(struct navit *this_, struct point *p);
 void navit_zoom_in(struct navit *this_, int factor, struct point *p);
index 84d1aa1..aaf31ea 100644 (file)
@@ -216,7 +216,7 @@ plugin_new(struct attr *parent, struct attr **attrs) {
        int i, count;
        char **array;
        char *name;
-       struct plugin *pl;
+       struct plugin *pl=NULL;
        struct plugins *pls;
 
        pls=parent->u.plugins;
index 7133f72..3af60f6 100644 (file)
@@ -2173,8 +2173,6 @@ rp_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo)
 static struct item *
 rm_get_item(struct map_rect_priv *mr)
 {
-       struct route *r = mr->mpriv->route;
-       struct route_path_segment *seg = mr->seg;
        dbg(1,"enter\n", mr->pos);
 
        mr->seg=mr->seg_next;
index e770df3..66eba91 100644 (file)
@@ -50,6 +50,7 @@ struct coord *transform_center(struct transformation *this_);
 void transform_set_angle(struct transformation *t, int angle);
 int transform_get_angle(struct transformation *this_, int angle);
 void transform_set_screen_selection(struct transformation *t, struct map_selection *sel);
+void transform_set_screen_center(struct transformation *t, struct point *p);
 void transform_get_size(struct transformation *t, int *width, int *height);
 void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle);
 void transform_setup_source_rect(struct transformation *t);
@@ -71,6 +72,7 @@ int transform_within_dist_line(struct coord *ref, struct coord *c0, struct coord
 int transform_within_dist_polyline(struct coord *ref, struct coord *c, int count, int close, int dist);
 int transform_within_dist_polygon(struct coord *ref, struct coord *c, int count, int dist);
 int transform_within_dist_item(struct coord *ref, enum item_type type, struct coord *c, int count, int dist);
+void transform_destroy(struct transformation *t);
 /* end of prototypes */
 #ifdef __cplusplus
 }