From 72c33083f54c2733aed6007addceff7d4192bd67 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 19 Jul 2005 22:29:35 +0000 Subject: [PATCH] (svn r2645) Fix (useless)warning in graph_gui and add brackets around HASBIT in an if statement --- graph_gui.c | 5 ++--- train_cmd.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/graph_gui.c b/graph_gui.c index 6f65854f14..0c3ecf5bc7 100644 --- a/graph_gui.c +++ b/graph_gui.c @@ -1150,7 +1150,6 @@ static void SignListWndProc(Window *w, WindowEvent *e) { switch (e->event) { case WE_PAINT: { - uint32 i; int y = 16; // offset from top of widget if (_sign_sort_dirty) @@ -1167,8 +1166,8 @@ static void SignListWndProc(Window *w, WindowEvent *e) return; } - { - SignStruct *ss; + { const SignStruct *ss; + uint16 i; /* Start drawing the signs */ for (i = w->vscroll.pos; i < w->vscroll.cap + w->vscroll.pos && i < w->vscroll.count; i++) { diff --git a/train_cmd.c b/train_cmd.c index 6508eaa58b..5a5eb70fff 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -47,7 +47,7 @@ void TrainCargoChanged(Vehicle *v) { vweight += rvi->weight; vweight += (_cargoc.weights[u->cargo_type] * u->cargo_count) / 16; // powered wagons have extra weight added - if HASBIT(u->u.rail.flags, VRF_POWEREDWAGON) + if (HASBIT(u->u.rail.flags, VRF_POWEREDWAGON)) vweight += RailVehInfo(v->engine_type)->pow_wag_weight; // consist weight is the sum of the weight of all vehicles in the consist