You can make a goldcard for your phone, then root it. That way you can revert it to its original state for any warranty repairs.
Also, atleast here in norway, if there is a hardware warranty issue they have to fix it, even if its rooted, provided its not a direct result of rooting (Battery...