]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: Remove default from switch in virStoragePoolSourceFindDuplicate
authorJohn Ferlan <jferlan@redhat.com>
Thu, 2 Apr 2015 16:39:27 +0000 (12:39 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Apr 2015 10:40:08 +0000 (06:40 -0400)
So that we can cover all the cases.

src/conf/storage_conf.c

index bb89bb75784b1c2f34ed4a674d21310ea2751f84..1fadff49557387b6036fdf5eb555bb9e9cdd213f 100644 (file)
@@ -2458,7 +2458,7 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
 
         virStoragePoolObjLock(pool);
 
-        switch (pool->def->type) {
+        switch ((virStoragePoolType)pool->def->type) {
         case VIR_STORAGE_POOL_DIR:
             if (STREQ(pool->def->target.path, def->target.path))
                 matchpool = pool;
@@ -2544,7 +2544,12 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
         case VIR_STORAGE_POOL_DISK:
             matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
             break;
-        default:
+        case VIR_STORAGE_POOL_MPATH:
+        case VIR_STORAGE_POOL_RBD:
+        case VIR_STORAGE_POOL_SHEEPDOG:
+        case VIR_STORAGE_POOL_GLUSTER:
+        case VIR_STORAGE_POOL_ZFS:
+        case VIR_STORAGE_POOL_LAST:
             break;
         }
         virStoragePoolObjUnlock(pool);