Compiler warning C4101: unreferenced local variable

Another attempt at fixing this warning.