Remove unused variable and function call

Finally get rid of that compiler warning.