提交 487d57b3 编写于 作者: J Jim Meyering

avoid compiler warning when all storage backends are disabled

* src/storage_backend.c (backends): Add a NULL terminator.
(virStorageBackendForType): Use NULL terminator rather than
warning-provoking (possibly 0) array size.
上级 a6c7f474
Tue Oct 28 13:29:14 +0100 2008 Jim Meyering <meyering@redhat.com>
avoid compiler warning when all storage backends are disabled
* src/storage_backend.c (backends): Add a NULL terminator.
(virStorageBackendForType): Use NULL terminator rather than
warning-provoking (possibly 0) array size.
Tue Oct 28 13:29:14 +0100 2008 Jim Meyering <meyering@redhat.com>
avoid many mingw-specific warnings
......
......@@ -82,13 +82,14 @@ static virStorageBackendPtr backends[] = {
#if WITH_STORAGE_DISK
&virStorageBackendDisk,
#endif
NULL
};
virStorageBackendPtr
virStorageBackendForType(int type) {
unsigned int i;
for (i = 0 ; i < ARRAY_CARDINALITY(backends); i++)
for (i = 0; backends[i]; i++)
if (backends[i]->type == type)
return backends[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册