diff src/text/textui.c @ 766:1ad4eb5c29de

2006-7-13 Brian Masney <masneyb@gftp.org> * src/text/textui.c src/uicommon/gftpui.c - fixed a few minor warnings from splint.
author masneyb
date Fri, 14 Jul 2006 00:37:27 +0000
parents 739afd9df73c
children c1144630c4f4
line wrap: on
line diff
--- a/src/text/textui.c	Fri Jul 14 00:34:11 2006 +0000
+++ b/src/text/textui.c	Fri Jul 14 00:37:27 2006 +0000
@@ -184,7 +184,7 @@
 {
   static int progress_pos = 0;
   char *progress = "|/-\\";
-  int sw, tot, i;
+  unsigned int sw, tot, i;
 
   printf ("\r%c [", progress[progress_pos++]);
 
@@ -192,15 +192,15 @@
     progress_pos = 0;
 
   sw = gftp_text_get_win_size () - 20;
-  tot = (float) tdata->curtrans / (float) tdata->tot_file_trans * (float) sw;
+  tot = (unsigned int) ((float) tdata->curtrans / (float) tdata->tot_file_trans * (float) sw);
                         
   if (tot > sw)
     tot = sw;
 
-  for (i=0; i<tot; i++)
+  for (i = 0; i < tot; i++)
     printf ("=");
 
-  for (i=0; i<sw-tot; i++)
+  for (i = 0; i < sw - tot; i++)
     printf (" ");
 
   printf ("] @ %.2fKB/s", tdata->kbs);