add -Wextra, fixed more gcc warnings