The difference is minimal, especially on a 'worn-in' engine. It's highly unlikely to do any damage per se, however bear in mind 10w40 is slightly thicker than 5w40 and it will take slightly longer to properly lubricate the engine on cold starts.
Therefore if it were my car I'd be telling him to put the correct viscosity oil in it.