Remove unused variables and the corresponding warnings along with them.