]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Resolve Coverity DEADCODE
authorJohn Ferlan <jferlan@redhat.com>
Thu, 4 Sep 2014 19:30:33 +0000 (15:30 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 11 Sep 2014 12:10:13 +0000 (08:10 -0400)
Coverity complains that the various checks for autoincrement and changed
variables are DEADCODE - seems to me to be a false positive - so mark it.

Signed-off-by: John Ferlan <jferlan@redhat.com>
tests/virstringtest.c

index 7c25b22c6710c8457fec014303da194bde2d1f3c..10fad2c88013cd1ef067c5338b5cb136619c55b6 100644 (file)
@@ -162,10 +162,12 @@ testStrdup(const void *data ATTRIBUTE_UNUSED)
         virFilePrintf(stderr, "unexpected strdup result %d, expected 1\n", value);
         goto cleanup;
     }
+    /* coverity[dead_error_begin] */
     if (i != 1) {
         virFilePrintf(stderr, "unexpected side effects i=%zu, expected 1\n", i);
         goto cleanup;
     }
+    /* coverity[dead_error_begin] */
     if (j != 1) {
         virFilePrintf(stderr, "unexpected side effects j=%zu, expected 1\n", j);
         goto cleanup;
@@ -182,14 +184,17 @@ testStrdup(const void *data ATTRIBUTE_UNUSED)
         virFilePrintf(stderr, "unexpected strdup result %d, expected 0\n", value);
         goto cleanup;
     }
+    /* coverity[dead_error_begin] */
     if (i != 2) {
         virFilePrintf(stderr, "unexpected side effects i=%zu, expected 2\n", i);
         goto cleanup;
     }
+    /* coverity[dead_error_begin] */
     if (j != 2) {
         virFilePrintf(stderr, "unexpected side effects j=%zu, expected 2\n", j);
         goto cleanup;
     }
+    /* coverity[dead_error_begin] */
     if (k != 1) {
         virFilePrintf(stderr, "unexpected side effects k=%zu, expected 1\n", k);
         goto cleanup;