The warranty should not be void by using water softener, BUT read product manual.http://waterheatertimer.org/Water-heater-manufacturers.html
1) First thing: Why is water heater leaking? Where is the leak?http://waterheatertimer.org/Leaking-water-heater.html
For example, if you have electric water heater leaking from element, then replace element.
Replace leaking TP valve.
If water is leaking down vent pipe, and combustion chamber rusted out, then vent problem must be corrected.
These are not covered by warranty.
If tank is rusted out, then read below.
2) If water heater is rusted out after 4 years, you might have stray current corrosion.
This happens when hot and cold pipes are not connected together with a ground wire, and/or if cold water pipe is not grounded to earth.
This might not be covered by warranty.
3) Read water heater instruction manual for advisories.
Tanks rust out when anode rod is depleted. Softened water depletes anode rod faster.
Instruction manual says to check anode rod each year.
Checking anode rod is like checking oil on an engine. If oil was never checked and engine burned up, the manufacturer will not honor the warranty.
If anode rod is depleted, and tank is rusted out, the warranty might not cover the rusted tank since owner was supposed to check for anode depletion.
4) Anode rods can also be covered with calcium deposits and stop working.
This night not have anything to do with water softener, but anode stops working and tanks rusts out.
In any case the owner's manual probably says to check anode rod to prevent leaking from rusted tankhttp://waterheatertimer.org/Replace-anode-rod.html