The housebuilder warned on earnings after a higher proportion of the homes it built this year were classed as affordable.