提交 10be7f3c 编写于 作者: D Daniel P. Berrangé

tests: fix warning with old GCC about missing struct initializer

Old GCC isn't happy about the {0} initializer because the first
field in the struct is itself a struct.

../../tests/openvzutilstest.c: In function 'testReadNetworkConf':
../../tests/openvzutilstest.c:101:12: error: missing braces around initializer [-Werror=missing-braces]
     struct openvz_driver driver = {0};
            ^

This fixes commit 4a4132b4Signed-off-by: NDaniel Berrange <berrange@localhost.localdomain>
上级 4ce7e743
......@@ -98,10 +98,10 @@ testReadNetworkConf(const void *data G_GNUC_UNUSED)
" </interface>\n"
" </devices>\n"
"</domain>\n";
struct openvz_driver driver = {0};
driver.xmlopt = openvzXMLOption(&driver);
driver.caps = openvzCapsInit();
struct openvz_driver driver = {
.xmlopt = openvzXMLOption(&driver),
.caps = openvzCapsInit(),
};
if (!(def = virDomainDefNew()))
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册