Skip to content

Commit

Permalink
tests: Fix unused variable warning in some compilers
Browse files Browse the repository at this point in the history
The variable is being assigned to but never read when exceptions are
disabled.
  • Loading branch information
zeux committed Nov 19, 2016
1 parent 8df9f97 commit 5115db7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ int main(int, char** argv)
total++;
passed += run_test(test, test->_name, custom_allocate);

#ifndef PUGIXML_NO_EXCEPTIONS
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++;
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
#endif
}
#endif
}

unsigned int failed = total - passed;
Expand Down

0 comments on commit 5115db7

Please sign in to comment.