If you have applied a lot of mods on your HTC One and you have to send it for warranty back to HTC or network provider for some reason, you will have to flash the stock firmware to bring it back to factory settings. This will remove all sorts of modifications like custom ROM, custom CWM / TWRP and so on. This will, as expected, remove root a k a super user access from it.
Download the stock ROM from here and flash it by connecting your HTC One via USB cable to your computer. Again, make sure you have backed up everything and anything. This will, however, would not remove anything stored on your phone’s micro SD card. You will have to delete / format it manually.
We also recommend flashing the stock ROM if you are going to sell it online on sites like ebay.