mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
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.
This commit is contained in:
parent
a6c7f474eb
commit
487d57b341
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
Tue Oct 28 13:29:14 +0100 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
avoid many mingw-specific warnings
|
avoid many mingw-specific warnings
|
||||||
|
@ -82,13 +82,14 @@ static virStorageBackendPtr backends[] = {
|
|||||||
#if WITH_STORAGE_DISK
|
#if WITH_STORAGE_DISK
|
||||||
&virStorageBackendDisk,
|
&virStorageBackendDisk,
|
||||||
#endif
|
#endif
|
||||||
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
virStorageBackendPtr
|
virStorageBackendPtr
|
||||||
virStorageBackendForType(int type) {
|
virStorageBackendForType(int type) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0 ; i < ARRAY_CARDINALITY(backends); i++)
|
for (i = 0; backends[i]; i++)
|
||||||
if (backends[i]->type == type)
|
if (backends[i]->type == type)
|
||||||
return backends[i];
|
return backends[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user