[PATCH v2 6/7] storage_backend: Resolve Coverity issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 5d06eb6..8d5880e 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -663,6 +663,7 @@ virStorageBackendCreateQemuImgOpts(char **opts,
                     }
                     break;
 
+                /* coverity[dead_error_begin] */
                 case VIR_STORAGE_FILE_FEATURE_LAST:
                     ;
                 }
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]