Yes. Some devices are pre-rooted from the factory (Samsung Nexus phone was one of them) but otherwise, rooting voids the warranty.
That said, noting prevents you from flashing back the stock, unrooted operating system, thereby restoring the warranty. If your device has a custom-binary counter, such as those included with the S2+ Galaxies you can use counter-reset tools (root required). Triangle-away for the S2 not only resets the counter but also defaults the state to "Samsung Official", even though you are running a custom firmware.
Root away, IMO.