From: John Ferlan Date: Tue, 22 Jan 2013 14:40:57 +0000 (-0500) Subject: lxc: Add coverity[dead_error_begin] tag in switch stmts X-Git-Tag: v1.0.2-rc1~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15666e026f4de6a1a785ab23e8eb121510b610d2;p=thirdparty%2Flibvirt.git lxc: Add coverity[dead_error_begin] tag in switch stmts 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. --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 3268e22425..70b4f52afe 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -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 */