]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
text-progress-bar: clean up warnings
authorRay Strode <rstrode@redhat.com>
Wed, 9 Feb 2011 19:39:10 +0000 (14:39 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 9 Feb 2011 20:07:14 +0000 (15:07 -0500)
src/libply-splash-core/ply-text-progress-bar.c

index 5e9baa29920c33c5d4e79e70aa1544b181b86cce..39e98cf02f0acf76a30c42f0d0790d1ff109b0d5 100644 (file)
@@ -57,7 +57,7 @@
 
 #define NUMBER_OF_INDICATOR_COLUMNS 6
 
-static char *os_string = "";
+static char *os_string;
 
 struct _ply_text_progress_bar
 {
@@ -124,12 +124,14 @@ out:
 void
 ply_text_progress_bar_draw (ply_text_progress_bar_t *progress_bar)
 {
-    int i, width = progress_bar->number_of_columns - 2 - strlen (os_string);
+    int i, width;
     double brown_fraction, blue_fraction, white_fraction;
 
     if (progress_bar->is_hidden)
       return;
 
+    width = progress_bar->number_of_columns - 2 - strlen (os_string);
+
     ply_text_display_set_cursor_position (progress_bar->display,
                                           progress_bar->column,
                                           progress_bar->row);