add -Wextra and a related fix