On most devices the process to obtain -Root- alone is very simple.
Doing so will not void your warranty in most cases - It’s a software setting, go through the Uninstall avast! steps, do a factory data reset, and root is gone anyhow.
Flashing a Custom ROM image with Root enabled WILL void your warranty.
Using newer “One Click” Root methods it is possible to Root your phone, and install avast! with the settings working perfectly. (In most cases ::)) These same programs have the ability to remove all Root settings on the device- returning it to stock.(Do Uninstall avast! First though, without root it will not be fully functional) ;D
Some phones actually prevent you from Keeping Root, and it will be lost on the next reboot of the phone. In these cases Flashing a Custom ROM image may be your only option. This is when to start questioning the warranty.
This is just advice, I won’t claim them as facts - but in the case of sending your device in for warranty, you’ve either shattered it and have insurance - or they’ve found a device defect that they recall them for anyhow. Many new devices have a means of telling if the factory image was changed - this is the ROM, avoid flashing the ROM unless you have a copy of the stock image and are willing to take all the steps to get back. This will always void your warranty.