turn on -Werror and fix resulting errors