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

Re: Few warnings in cvs



On 2006-11-14 20:52:56 +0000, Rocco Rutte wrote:
> Yes. Maybe it's some legacy code or something where somebody used 
> 'unsigned char' instead of uint8_t.

Why not int? Here c1 is nothing more than an array index:

                    c1 = 0;

                    /* If pattern is `[[:'.  */
                    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);

                    for (;;)
                      {
                        PATFETCH (c);
                        if (c == ':' || c == ']' || p == pend
                            || c1 == CHAR_CLASS_MAX_LENGTH)
                          break;
                        str[c1++] = c;
                      }
                    str[c1] = '\0';

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)