aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/fbsplash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 37ca66559..05a77da23 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -312,8 +312,7 @@ static void fb_drawprogressbar(unsigned percent)
312 312
313 pos_x = left_x; 313 pos_x = left_x;
314 if (percent > 0) { 314 if (percent > 0) {
315 int y; 315 int i, y;
316 unsigned i;
317 316
318 // actual progress bar 317 // actual progress bar
319 pos_x += (unsigned)(width * percent) / 100; 318 pos_x += (unsigned)(width * percent) / 100;
@@ -325,7 +324,7 @@ static void fb_drawprogressbar(unsigned percent)
325 while (i >= 0) { 324 while (i >= 0) {
326 // draw one-line thick "rectangle" 325 // draw one-line thick "rectangle"
327 // top line will have gray lvl 200, bottom one 100 326 // top line will have gray lvl 200, bottom one 100
328 unsigned gray_level = 100 + i*100 / height; 327 unsigned gray_level = 100 + (unsigned)i*100 / height;
329 fb_drawfullrectangle( 328 fb_drawfullrectangle(
330 left_x, y, pos_x, y, 329 left_x, y, pos_x, y,
331 gray_level, gray_level, gray_level); 330 gray_level, gray_level, gray_level);