/* collision resolution using open addressing with linear probing */
- while((ptr = hash->hash_table[position]) != NULL) {
+ while(hash->hash_table[position] != NULL) {
position = (position + 1) % hash->buckets;
}
--
1.7.4.2
04-04-2011, 08:58 AM
Xavier
Remove dead stores reported by clang-analyzer
Allan McRae wrote:
>
> Please send patches to the list so that we can complain about issues like:
>
> aba191d5 (Xavier Chantry 2011-04-03 10:28:09 +0200 276)
> printf("%lc", *p);
>
> util.c: In function ‘indentprint’:
> util.c:276:3: error: format ‘%lc’ expects argument of type ‘wint_t’,
> but argument 2 has type ‘wchar_t’ [-Werror=format]
> cc1: all warnings being treated as errors
>
>
This one was not supposed to be committed, I know Dan would have rejected it
anyway.
I was just pissed off by this dumb issue, and I did not manage to make gcc
break. Is that with gcc 4.6 (I was on 4.5) ?