summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-04-26 05:50:53 +0000
committerhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-04-26 05:50:53 +0000
commit62ff992ba54cb7ad5a95821ab4a61f82cf94e3c5 (patch)
tree29effd39d899da3fd10b1f1888b5998f62053295
parentefa21504abd975a042e6d786067126b78129c9ea (diff)
downloadnavit-svn-62ff992ba54cb7ad5a95821ab4a61f82cf94e3c5.tar.gz
Fix:Core:Fix some compiler warnings
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@2234 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--command.c6
-rw-r--r--graphics.c2
-rw-r--r--navigation.c8
-rw-r--r--navit.c11
-rw-r--r--osd.c2
-rw-r--r--vehicleprofile.c5
6 files changed, 17 insertions, 17 deletions
diff --git a/command.c b/command.c
index 925fa66a..ec5fb56e 100644
--- a/command.c
+++ b/command.c
@@ -712,7 +712,7 @@ void command(struct attr *attr, char *expr)
}
#endif
-void
+static void
command_evaluate_to(struct attr *attr, char *expr, struct context *ctx, struct result *res)
{
memset(res, 0, sizeof(*res));
@@ -740,7 +740,7 @@ command_evaluate_to_string(struct attr *attr, char *expr, int **error)
{
struct result res;
struct context ctx;
- char *ret;
+ char *ret=NULL;
command_evaluate_to(attr, expr, &ctx, &res);
if (!ctx.error)
@@ -758,7 +758,7 @@ command_evaluate_to_int(struct attr *attr, char *expr, int **error)
{
struct result res;
struct context ctx;
- int ret;
+ int ret=0;
command_evaluate_to(attr, expr, &ctx, &res);
if (!ctx.error)
diff --git a/graphics.c b/graphics.c
index b2045679..2802be69 100644
--- a/graphics.c
+++ b/graphics.c
@@ -1756,7 +1756,7 @@ void graphics_displaylist_draw(struct graphics *gra, struct displaylist *display
gra->meth.draw_mode(gra->priv, draw_mode_end);
}
-void graphics_load_mapset(struct graphics *gra, struct displaylist *displaylist, struct mapset *mapset, struct transformation *trans, struct layout *l, int async, struct callback *cb)
+static void graphics_load_mapset(struct graphics *gra, struct displaylist *displaylist, struct mapset *mapset, struct transformation *trans, struct layout *l, int async, struct callback *cb)
{
int order=transform_get_order(trans);
diff --git a/navigation.c b/navigation.c
index 5e6927a5..31844984 100644
--- a/navigation.c
+++ b/navigation.c
@@ -1174,7 +1174,7 @@ command_new(struct navigation *this_, struct navigation_itm *itm, int delta)
ret->itm=itm;
if (itm && itm->prev && itm->prev->ways && !(itm->flags & AF_ROUNDABOUT) && (itm->prev->flags & AF_ROUNDABOUT)) {
int len=0;
- int angle;
+ int angle=0;
int entry_angle;
struct navigation_itm *itm2=itm->prev;
int exit_angle=angle_median(itm->prev->angle_end, itm->ways->angle2);
@@ -1339,7 +1339,7 @@ show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigat
/* TRANSLATORS: right, as in 'Turn right' */
char *dir=_("right"),*strength="";
int distance=itm->dest_length-cmd->itm->dest_length;
- char *d,*ret;
+ char *d,*ret=NULL;
int delta=cmd->delta;
int level;
int strength_needed;
@@ -1540,7 +1540,7 @@ show_next_maneuvers(struct navigation *nav, struct navigation_itm *itm, struct n
{
struct navigation_command *cur,*prev;
int distance=itm->dest_length-cmd->itm->dest_length;
- int l0_dist,level,dist,i,time;
+ int level, dist, i, time;
int speech_time,time2nav;
char *ret,*old,*buf,*next;
@@ -1668,7 +1668,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at
struct item *sitem; /* Holds the corresponding item from the actual map */
struct attr street_item,street_direction;
struct navigation_itm *itm;
- int mode,incr=0,first=1;
+ int mode=0, incr=0, first=1;
if (attr->type != attr_route_status)
return;
diff --git a/navit.c b/navit.c
index f0082c6b..039e2fbc 100644
--- a/navit.c
+++ b/navit.c
@@ -181,7 +181,7 @@ navit_get_tracking(struct navit *this_)
return this_->tracking;
}
-void
+static void
navit_draw_async(struct navit *this_, int async)
{
GList *l;
@@ -508,7 +508,6 @@ navit_scale(struct navit *this_, long scale, struct point *p, int draw)
static void
navit_autozoom(struct navit *this_, struct coord *center, int speed, int draw)
{
- struct coord c;
struct point pc;
int distance,w,h;
double new_scale;
@@ -605,10 +604,10 @@ navit_cmd_zoom_out(struct navit *this_)
}
static struct command_table commands[] = {
- {"zoom_in",navit_cmd_zoom_in},
- {"zoom_out",navit_cmd_zoom_out},
- {"zoom_to_route",navit_cmd_zoom_to_route},
- {"set_center_cursor",navit_cmd_set_center_cursor},
+ {"zoom_in",command_cast(navit_cmd_zoom_in)},
+ {"zoom_out",command_cast(navit_cmd_zoom_out)},
+ {"zoom_to_route",command_cast(navit_cmd_zoom_to_route)},
+ {"set_center_cursor",command_cast(navit_cmd_set_center_cursor)},
};
diff --git a/osd.c b/osd.c
index 5e87fbb5..dc056101 100644
--- a/osd.c
+++ b/osd.c
@@ -87,7 +87,7 @@ osd_std_resize(struct osd_item *item)
graphics_overlay_resize(item->gr, &item->p, item->w, item->h, 65535, 1);
}
-void
+static void
osd_std_calculate_sizes(struct osd_item *item, struct osd_priv *priv, int w, int h)
{
struct attr vehicle_attr;
diff --git a/vehicleprofile.c b/vehicleprofile.c
index aba3b03c..f6875ae9 100644
--- a/vehicleprofile.c
+++ b/vehicleprofile.c
@@ -21,9 +21,10 @@
#include <string.h>
#include "debug.h"
#include "item.h"
+#include "roadprofile.h"
#include "vehicleprofile.h"
-void
+static void
vehicleprofile_set_attr_do(struct vehicleprofile *this_, struct attr *attr)
{
dbg(1,"%s:%d\n", attr_to_name(attr->type), attr->u.num);
@@ -85,7 +86,7 @@ vehicleprofile_add_attr(struct vehicleprofile *this_, struct attr *attr)
struct attr item_types_attr;
switch (attr->type) {
case attr_roadprofile:
- if (roadprofile_get_attr(attr->u.roadprofile, attr_item_types, &item_types_attr)) {
+ if (roadprofile_get_attr(attr->u.roadprofile, attr_item_types, &item_types_attr, NULL)) {
enum item_type *types=item_types_attr.u.item_types;
while (*types != type_none) {
g_hash_table_insert(this_->roadprofile_hash, (void *)(long)(*types), attr->u.roadprofile);