add -Wextra and fix some warning