Fix:core:Fix some warnings
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 23 Apr 2012 18:44:09 +0000 (18:44 +0000)
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 23 Apr 2012 18:44:09 +0000 (18:44 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5032 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/file.c
navit/navit/gui/internal/gui_internal.c
navit/navit/maptool/boundaries.c
navit/navit/maptool/google/protobuf-c/protobuf-c.c
navit/navit/maptool/osm_protobufdb.c
navit/navit/navit.c
navit/navit/osd.c
navit/navit/route.h

index 6c530be..ce9dcab 100644 (file)
@@ -220,7 +220,6 @@ file_http_header(struct file *f, char *header)
 struct file *
 file_create(char *name, struct attr **options)
 {
-       struct stat stat;
        struct file *file= g_new0(struct file,1);
        struct attr *attr;
        int open_flags=O_LARGEFILE|O_BINARY;
index 3345b3b..dad63ed 100644 (file)
@@ -2812,7 +2812,7 @@ static struct graphics_image * gui_internal_poi_icon(struct gui_priv *this, enum
                while(itemgra) {
                        GList *types=((struct itemgra *)itemgra->data)->type;
                        while(types) {
-                               if((int)types->data==type) {
+                               if((long)types->data==type) {
                                        GList *element=((struct itemgra *)itemgra->data)->elements;
                                        while(element) {
                                                struct element * el=element->data;
@@ -3133,9 +3133,7 @@ gui_internal_cmd_pois(struct gui_priv *this, struct widget *wm, void *data)
        struct fibheap* fh = fh_makekeyheap();
        int cnt = 0;
        struct table_data *td;
-       int width=wm->w;
-       
-       
+
        if(data) {
          param = data;
        } else {
index 95599cc..19c57c9 100644 (file)
@@ -196,7 +196,7 @@ process_boundaries_insert(GList *list, struct boundary *boundary)
 static GList *
 process_boundaries_finish(GList *boundaries_list)
 {
-       GList *l,*sl,*l2,*ln;
+       GList *l,*sl;
        GList *ret=NULL;
        l=boundaries_list;
        while (l) {
@@ -265,6 +265,7 @@ process_boundaries_finish(GList *boundaries_list)
        l=boundaries_list;
        while (l) {
                struct boundary *boundary=l->data;
+               GList *l2,*ln;
                ln=l2=g_list_next(l);
                while (l2) {
                        struct boundary *boundary2=l2->data;
index 4e4094f..efa5fd3 100644 (file)
@@ -1303,9 +1303,11 @@ pack_buffer_packed_payload (const ProtobufCFieldDescriptor *field,
     }
   return rv;
 
+#if IS_LITTLE_ENDIAN
 no_packing_needed:
   buffer->append (buffer, rv, array);
   return rv;
+#endif
 }
 
 static size_t
index 77f4aa6..315de6a 100644 (file)
@@ -421,7 +421,7 @@ osm_protobufdb_string(struct osm_protobufdb_context *ctx, char *str)
        gpointer value;
        assert(ctx->string_hash != NULL);
        if (g_hash_table_lookup_extended(ctx->string_hash, str, NULL, &value)) {
-               return (int)value;      
+               return (long)value;
        }
        if (!st->n_s) {
                st->n_s++;
index 95ccc14..ca67809 100644 (file)
@@ -1297,7 +1297,7 @@ static void
 navit_cmd_spawn(struct navit *this, char *function, struct attr **in, struct attr ***out, int *valid)
 {
        int i,j, nparms, nvalid;
-       const char ** argv=NULL;
+       char ** argv=NULL;
        struct spawn_process_info *pi;
 
        nparms=0;
index 8c0e378..a2feeb2 100644 (file)
@@ -39,7 +39,6 @@ struct osd {
 struct osd *
 osd_new(struct attr *parent, struct attr **attrs)
 {
-       struct attr *attr;
        struct osd *o;
        struct osd_priv *(*new)(struct navit *nav, struct osd_methods *meth, struct attr **attrs);
        struct attr *type=attr_search(attrs, NULL, attr_type);
index ca2ea37..6834d5b 100644 (file)
@@ -97,6 +97,7 @@ void route_set_destinations(struct route *this_, struct pcoord *dst, int count,
 int route_get_destinations(struct route *this_, struct pcoord *pc, int count);
 int route_get_destination_count(struct route *this_);
 void route_set_destination(struct route *this_, struct pcoord *dst, int async);
+void route_append_destination(struct route *this_, struct pcoord *dst, int async);
 void route_remove_nth_waypoint(struct route *this_, int n);
 void route_remove_waypoint(struct route *this_);
 char* route_get_destination_description(struct route *this_, int n);