<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Compilation warnings, configure



On 03-04-2007 19:38:57 +0200, Fabian Groffen wrote:
> diff -ur mutt-1.5.14cvs.orig/regex.c mutt-1.5.14cvs/regex.c
> 
> warning: comparison always yields in false due to limited data type
> second hunk: warning: XXX defined but never used
> 
> --- mutt-1.5.14cvs.orig/regex.c       2007-04-03 17:32:43.795576000 +0200
> +++ mutt-1.5.14cvs/regex.c    2007-04-03 19:14:11.980070000 +0200
> @@ -2197,7 +2197,7 @@
>                        {
>                          PATFETCH (c);
>                          if (c == ':' || c == ']' || p == pend
> -                            || c1 == CHAR_CLASS_MAX_LENGTH)
> +                            || c1 == (unsigned char) CHAR_CLASS_MAX_LENGTH)
>                            break;
>                          str[c1++] = c;
>                        }

On a second thought this is plain wrong, sorry.  Better cast c1 to an
int in this case to avoid the warning.  If the compiler is right (which
I think it is) this cast means something is going to go wrong on Solaris
at least.


-- 
Fabian Groffen
Gentoo on a different level