]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: Add coverity[dead_error_begin] tag in switch stmts
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Jan 2013 14:40:57 +0000 (09:40 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Jan 2013 15:59:45 +0000 (16:59 +0100)
The use of switch statements inside a bounded for loop resulted in some
false positives regarding the "default:" label which cannot be reached
since each of the other case statements use the possible for loop values.

src/lxc/lxc_driver.c

index 3268e22425a6f32ae90984579dcfa1f7fb486e1c..70b4f52afe5f816ad6a08401b2051db45b135872 100644 (file)
@@ -920,6 +920,7 @@ lxcDomainGetMemoryParameters(virDomainPtr dom,
                 goto cleanup;
             break;
 
+        /* coverity[dead_error_begin] */
         default:
             break;
             /* should not hit here */
@@ -2175,6 +2176,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
                     goto cleanup;
                 break;
 
+            /* coverity[dead_error_begin] */
             default:
                 break;
                 /* should not hit here */
@@ -2192,6 +2194,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
                     goto cleanup;
                 break;
 
+            /* coverity[dead_error_begin] */
             default:
                 break;
                 /* should not hit here */