From 82bc40350a3bff0feb0e975bf1b8e423febab63e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 26 May 2014 11:24:14 +0100 Subject: Reuce scope of several variables. --- riscos/gui/progress_bar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'riscos') diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c index 8de19540b..cd4b08929 100644 --- a/riscos/gui/progress_bar.c +++ b/riscos/gui/progress_bar.c @@ -399,9 +399,8 @@ void ro_gui_progress_bar_animate(void *p) void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width, int height) { - os_error *error; int icon_width, icon_height; - int icon_x0 = 0, icon_y0 = 0, progress_x0, progress_x1, progress_ymid = 0; + int icon_x0 = 0, icon_y0 = 0, progress_x0, progress_x1; osspriteop_header *icon = NULL; bool icon_redraw = false; @@ -422,7 +421,8 @@ void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width, /* get the icon information */ if (progress_bar_definition.sprite_area != wimpspriteop_AREA) { - progress_ymid = height / 2; + int progress_ymid = height / 2; + os_error *error; error = xosspriteop_read_sprite_info(osspriteop_USER_AREA, progress_bar_definition.sprite_area, (osspriteop_id)pb->icon, @@ -474,7 +474,6 @@ void ro_gui_progress_bar_calculate(struct progress_bar *pb, int width, void ro_gui_progress_bar_redraw_window(wimp_draw *redraw, struct progress_bar *pb) { - os_error *error; osbool more = true; struct rect clip; int progress_ymid; @@ -491,6 +490,7 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw, /* redraw the window */ while (more) { + os_error *error; if (pb->icon) _swix(Tinct_PlotAlpha, _IN(2) | _IN(3) | _IN(4) | _IN(7), pb->icon_img, -- cgit v1.2.3