[libvirt] [PATCH 9/9] storage: Add coverity[dead_error_condition] to avoid error

John Ferlan jferlan at redhat.com
Tue Jan 22 14:41:04 UTC 2013


The local redefinition of PED_PARTITION_PROTECTED results in the error
but is not a problem especially if the built code doesn't have the latest
definitions.
---
 src/storage/parthelper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index 83f8279..c4af48f 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -129,6 +129,7 @@ int main(int argc, char **argv)
                 content = "free";
             else if (part->type & PED_PARTITION_METADATA)
                 content = "metadata";
+            /* coverity[dead_error_condition] - not true if defined */
             else if (part->type & PED_PARTITION_PROTECTED)
                 content = "protected";
             else
@@ -142,6 +143,7 @@ int main(int argc, char **argv)
                 content = "free";
             else if (part->type & PED_PARTITION_METADATA)
                 content = "metadata";
+            /* coverity[dead_error_condition] - not true if defined */
             else if (part->type & PED_PARTITION_PROTECTED)
                 content = "protected";
             else
-- 
1.7.11.7




More information about the libvir-list mailing list