Set flag -Wextra and fix warnings