Fix warning with OOM testing is disabled

This commit is contained in:
Daniel P. Berrange 2008-05-29 19:41:40 +00:00
parent aa2bb9c88c
commit 84494d2e0a
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,7 @@
Thu May 29 15:41:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* tests/testutils.c: Fix warning when OOM testing is disabled
Thu May 29 15:25:00 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* configure.in, scripts/*: Remove all coverage helper scripts

View File

@ -287,15 +287,17 @@ int virtTestDifference(FILE *stream,
return 0;
}
#if TEST_OOM
static void
virtTestErrorFuncQuiet(void *data ATTRIBUTE_UNUSED,
virErrorPtr err ATTRIBUTE_UNUSED)
{ }
#endif
#if TEST_OOM_TRACE
static void
virtTestErrorHook(int n, void *data ATTRIBUTE_UNUSED)
{
#if TEST_OOM_TRACE
void *trace[30];
int ntrace = ARRAY_CARDINALITY(trace);
int i;
@ -311,8 +313,8 @@ virtTestErrorHook(int n, void *data ATTRIBUTE_UNUSED)
}
free(symbols);
}
#endif
}
#endif
int virtTestMain(int argc,
@ -352,9 +354,10 @@ int virtTestMain(int argc,
if (ret != EXIT_SUCCESS)
return EXIT_FAILURE;
#if TEST_OOM_TRACE
if (testDebug)
virAllocTestHook(virtTestErrorHook, NULL);
#endif
if (testOOM) {
/* Makes next test runs quiet... */