Does rooting void s4 warranty if the thing that is wrong is not the fault of rooting?
Rooting your phone will void the warranty from both the carrier and the manufacturer. 

No matter what happens to be wrong. If they found that the phone's rooted then you'll have to face the consequences. 

*So your warranty will be void automatically with root. *