提交 a893b20e 编写于 作者: J John Ferlan

tests: Resolve Coverity DEADCODE

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: NJohn Ferlan <jferlan@redhat.com>
上级 2676903f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册