bug-gnulib
[Top][All Lists]
Advanced

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

Re: enable -Werror for lib/ in coreutils


From: Paolo Bonzini
Subject: Re: enable -Werror for lib/ in coreutils
Date: Thu, 29 Oct 2009 09:45:17 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 10/29/2009 09:23 AM, Jim Meyering wrote:
-           Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
> -           re_node_set_remove_at (dest_nodes, idx);
> +           Idx idx = re_node_set_contains (dest_nodes, cur_node);
> +           if (idx)
> +             re_node_set_remove_at (dest_nodes, idx - 1);

That looks like a good bug fix.

Not really a bug fix---previously you'd pass -1 and that would be ignored; with your patch you pass SIZE_MAX and the effect is the same.

Why use a signed type throughout rege*.[ch] when an unsigned one
more accurately models the data and interfaces?

Because upstream uses a signed type, and I'm not sure we want to deviate from there. I'd use intptr_t or ptrdiff_t.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]