Fix warnings for suspicious casts

The casts to void in this case are safe. Perhaps
we should generalise the hashtables, but that is
for later.