Remove unused variables along with the related warnings.