Remove unused local variables for 2.4