tests: Fix unused variable warning in some compilers
The variable is being assigned to but never read when exceptions are disabled.
This commit is contained in:
parent
8df9f97cda
commit
5115db7409
@ -190,14 +190,15 @@ int main(int, char** argv)
|
|||||||
total++;
|
total++;
|
||||||
passed += run_test(test, test->_name, custom_allocate);
|
passed += run_test(test, test->_name, custom_allocate);
|
||||||
|
|
||||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
|
||||||
if (g_memory_fail_triggered)
|
if (g_memory_fail_triggered)
|
||||||
{
|
{
|
||||||
|
// run tests that trigger memory failures twice - with an allocator that returns NULL and with an allocator that throws
|
||||||
|
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||||
total++;
|
total++;
|
||||||
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
|
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int failed = total - passed;
|
unsigned int failed = total - passed;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user