> Sent: On January 13, 2018 12:13 PM, René Scharfe wrote:
> Am 12.01.2018 um 20:52 schrieb Randall S. Becker:
> > On a related too many warnings subject, hashmap.h has a variable
> > unused (void *item). Is that addressed soon? If not, I can deal with
> > it.
> Here are the code lines containing the variable in question:
>
> void *item;
> while ((item = hashmap_iter_next(&iter)))
>
> Intriguing. The variable "item" is set, but can be removed without effect.
> GCC 7.2 and Clang 5 don't warn about that.
>
> The code was introduced by 8b604d1951 (hashmap: add API to disable item
> counting when threaded) and there is no patch in pu that touches it again,
I was thinking about just changing it to the following and submitting the
trivial patch:
while (hashmap_iter_next(&iter))
Avoids the frame allocation of void *item so should make it minimally faster
when compiled without optimization.
Cheers,
Randall