Re-enable -Werror and fix some warnings