It doesn't void your warranty, although the manufacturers have done a very good job spreading that lie. It is illegal in the US to void a hardware warranty because the user altered the software. If they can prove that your alteration led directly to damage, then they can refuse to cover that specific damage, but that's all.
Source: https://motherboard.vice.com/en_us/article/yp3nax/jailbreaki...