mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Fix warning with OOM testing is disabled
This commit is contained in:
parent
aa2bb9c88c
commit
84494d2e0a
@ -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
|
||||
|
@ -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... */
|
||||
|
Loading…
x
Reference in New Issue
Block a user