[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH libguestfs 5/9] fish.c: avoid signed/unsigned-comparison warning



On Fri, Aug 21, 2009 at 03:28:15PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyering redhat com>
> 
> * fish/fish.c (script): Change type of index to "unsigned int".
> ---
>  fish/fish.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fish/fish.c b/fish/fish.c
> index 9de8e07..fbac519 100644
> --- a/fish/fish.c
> +++ b/fish/fish.c
> @@ -517,7 +517,7 @@ script (int prompt)
>    char *cmd;
>    char *p, *pend;
>    char *argv[64];
> -  int i, len;
> +  int len;
>    int global_exit_on_error = !prompt;
>    int tilde_candidate;
> 
> @@ -581,7 +581,7 @@ script (int prompt)
>      if (len == 0) continue;
> 
>      cmd = buf;
> -    i = 0;
> +    unsigned int i = 0;
>      if (buf[len] == '\0') {
>        argv[0] = NULL;
>        goto got_command;
> -- 
> 1.6.4.378.g88f2f

ACK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]