diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-26 11:24:14 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-26 11:24:14 +0100 |
commit | 82bc40350a3bff0feb0e975bf1b8e423febab63e (patch) | |
tree | 35ce6fd892b900bf6a56522cbfd95aaf8355233c /riscos | |
parent | 609eb8377b63dc58af53050b3dc417d16a18b730 (diff) | |
download | netsurf-82bc40350a3bff0feb0e975bf1b8e423febab63e.tar.gz netsurf-82bc40350a3bff0feb0e975bf1b8e423febab63e.tar.bz2 |
Reuce scope of several variables.
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/gui/progress_bar.c | 8 |
1 files changed, 4 insertions, 4 deletions
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, |