fix several -Wextra warnings