fish.c: avoid signed/unsigned-comparison warning
authorJim Meyering <meyering@redhat.com>
Fri, 21 Aug 2009 12:58:20 +0000 (14:58 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 21 Aug 2009 13:24:25 +0000 (15:24 +0200)
* fish/fish.c (script): Change type of index to "unsigned int".

fish/fish.c

index 9de8e07..fbac519 100644 (file)
@@ -517,7 +517,7 @@ script (int prompt)
   char *cmd;
   char *p, *pend;
   char *argv[64];
   char *cmd;
   char *p, *pend;
   char *argv[64];
-  int i, len;
+  int len;
   int global_exit_on_error = !prompt;
   int tilde_candidate;
 
   int global_exit_on_error = !prompt;
   int tilde_candidate;
 
@@ -581,7 +581,7 @@ script (int prompt)
     if (len == 0) continue;
 
     cmd = buf;
     if (len == 0) continue;
 
     cmd = buf;
-    i = 0;
+    unsigned int i = 0;
     if (buf[len] == '\0') {
       argv[0] = NULL;
       goto got_command;
     if (buf[len] == '\0') {
       argv[0] = NULL;
       goto got_command;