tests: initialize some variables

Found by cppcheck:
[tests/metadatatest.c:284]: (error) Uninitialized variable: test
[tests/objecteventtest.c:855]: (error) Uninitialized variable: test

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Ján Tomko 2018-05-28 09:05:29 +02:00
parent 7f8e1cb68f
commit f8c4868a52
2 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ testTextMetadata(const void *data)
static int
mymain(void)
{
struct metadataTest test;
struct metadataTest test = { 0 };
int ret = EXIT_SUCCESS;
if (!(test.conn = virConnectOpen("test:///default")))

View File

@ -835,7 +835,7 @@ timeout(int id ATTRIBUTE_UNUSED, void *opaque ATTRIBUTE_UNUSED)
static int
mymain(void)
{
objecteventTest test;
objecteventTest test = { 0 };
int ret = EXIT_SUCCESS;
int timer;