Fixing unused variable 'tmp' on some compilers when compiled without debug