SERVER-9528 Fix unreferenced local variable warnings