Are you referring to the manufacturer's warrenty or the Sprint protection plan?
With the Sprint protection plan (i.e. in-store repairs or insurance replacement through Assurion), they won't check to see that your bootloader was unlocked or that you rooted. Just unroot and bring it in for service, and you'll be fine.
With the HTC 1-year warrenty (i.e. if Sprint has to send your phone back to HTC), I've heard that the 1st thing HTC does is check to see if you used the HTC unlock tool, and if you have then they won't honor the warrenty. In that case even if you unroot first, you're out of luck (which is what you agreed to when you used the unlock tool).