* 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 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
#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];