mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 05:17:54 +03:00
Fix build with clang 6.0.0
Clang 6.0.0 complains when initializing structure with { NULL }: conf/domain_addr.c:1494:38: error: missing field 'type' initializer [-Werror,-Wmissing-field-initializers] virDomainDeviceInfo nfo = { NULL }; Use { 0 } instead to make it happy. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ea9b0e580a
commit
1b6ff36c2f
@ -1491,7 +1491,7 @@ virDomainVirtioSerialAddrAssign(virDomainDefPtr def,
|
|||||||
bool portOnly)
|
bool portOnly)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virDomainDeviceInfo nfo = { NULL };
|
virDomainDeviceInfo nfo = { 0 };
|
||||||
virDomainDeviceInfoPtr ptr = allowZero ? &nfo : info;
|
virDomainDeviceInfoPtr ptr = allowZero ? &nfo : info;
|
||||||
|
|
||||||
ptr->type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL;
|
ptr->type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL;
|
||||||
|
@ -91,7 +91,7 @@ sysinfotest_run(const char *test,
|
|||||||
const char *cpuinfo,
|
const char *cpuinfo,
|
||||||
const char *expected)
|
const char *expected)
|
||||||
{
|
{
|
||||||
struct testSysinfoData testdata = { NULL };
|
struct testSysinfoData testdata = { 0 };
|
||||||
int ret = EXIT_FAILURE;
|
int ret = EXIT_FAILURE;
|
||||||
|
|
||||||
testdata.func = func;
|
testdata.func = func;
|
||||||
|
Loading…
Reference in New Issue
Block a user