]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage_backend: Resolve Coverity issue
authorJohn Ferlan <jferlan@redhat.com>
Thu, 11 Jul 2013 14:39:23 +0000 (10:39 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 11 Jul 2013 18:18:12 +0000 (14:18 -0400)
The switch statement in 'virStorageBackendCreateQemuImgOpts' used the
for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value,
but since that cannot happen Coverity spits out a DEADCODE message. Adding
the Coverity tag just removes the Coverity message

src/storage/storage_backend.c

index 5d06eb6e88fe3be47fdc6242a4e7dd9c63842d54..8d5880e449c93ad131c085f7ffd74ed01bf50cf1 100644 (file)
@@ -663,6 +663,7 @@ virStorageBackendCreateQemuImgOpts(char **opts,
                     }
                     break;
 
+                /* coverity[dead_error_begin] */
                 case VIR_STORAGE_FILE_FEATURE_LAST:
                     ;
                 }