Fix -Wassign-enum warnings.