summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-09-20 01:45:55 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-09-20 14:26:09 +0200
commitefaab93491751ccf39108d076745c6774b263232 (patch)
treeb00abecd4a88dc2934e888b31e8176cf32af17c7 /test/unit
parent055406bb398ddf60f18c545baffcec4ee4d5646e (diff)
downloadlvm2-efaab93491751ccf39108d076745c6774b263232.tar.gz
cov: ignore syscall
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/activation-generator_t.c4
-rw-r--r--test/unit/percent_t.c26
2 files changed, 15 insertions, 15 deletions
diff --git a/test/unit/activation-generator_t.c b/test/unit/activation-generator_t.c
index 7a2aa337b..f1e2aeda4 100644
--- a/test/unit/activation-generator_t.c
+++ b/test/unit/activation-generator_t.c
@@ -185,7 +185,7 @@ static const char *_fake_lvmconfig(const char *output)
fprintf(fp, "%s", output);
fprintf(fp, "EOF\n");
- fclose(fp);
+ (void) fclose(fp);
if (chmod(path, 0770))
test_fail("chmod 0777 failed on path %s", path);
@@ -234,7 +234,7 @@ static void _test_get_config(void *fixture)
test_fail("_get_config() <- '%s' unexpectedly succeeded", t->output);
}
- unlink(path);
+ (void) unlink(path);
}
}
diff --git a/test/unit/percent_t.c b/test/unit/percent_t.c
index 9b349a97c..3575e12b3 100644
--- a/test/unit/percent_t.c
+++ b/test/unit/percent_t.c
@@ -31,25 +31,25 @@ static void test_percent_100(void *fixture)
T_ASSERT_EQUAL(p1_100, DM_PERCENT_100);
T_ASSERT_NOT_EQUAL(n_100, DM_PERCENT_100);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p_100));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p_100));
T_ASSERT_EQUAL(strcmp(buf, "100.00"), 0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p1_100));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p1_100));
T_ASSERT_EQUAL(strcmp(buf, "100.00"), 0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(n_100));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(n_100));
T_ASSERT_NOT_EQUAL(strcmp(buf, "99.99"), 0); /* Would like to gett */
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_round_float(n_100, 2));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_round_float(n_100, 2));
T_ASSERT_EQUAL(strcmp(buf, "99.99"), 0);
- dm_snprintf(buf, sizeof(buf), "%.3f", dm_percent_to_round_float(n_100, 3));
+ (void) dm_snprintf(buf, sizeof(buf), "%.3f", dm_percent_to_round_float(n_100, 3));
T_ASSERT_EQUAL(strcmp(buf, "99.999"), 0);
- dm_snprintf(buf, sizeof(buf), "%.4f", dm_percent_to_round_float(n_100, 4));
+ (void) dm_snprintf(buf, sizeof(buf), "%.4f", dm_percent_to_round_float(n_100, 4));
T_ASSERT_EQUAL(strcmp(buf, "99.9999"), 0);
- dm_snprintf(buf, sizeof(buf), "%d", (int)dm_percent_to_round_float(n_100, 0));
+ (void) dm_snprintf(buf, sizeof(buf), "%d", (int)dm_percent_to_round_float(n_100, 0));
T_ASSERT_EQUAL(strcmp(buf, "99"), 0);
}
@@ -66,22 +66,22 @@ static void test_percent_0(void *fixture)
T_ASSERT_EQUAL(p1_0, DM_PERCENT_0);
T_ASSERT_NOT_EQUAL(n_0, DM_PERCENT_0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p_0));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p_0));
T_ASSERT_EQUAL(strcmp(buf, "0.00"), 0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p1_0));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(p1_0));
T_ASSERT_EQUAL(strcmp(buf, "0.00"), 0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(n_0));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(n_0));
T_ASSERT_NOT_EQUAL(strcmp(buf, "0.01"), 0);
- dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_round_float(n_0, 2));
+ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_round_float(n_0, 2));
T_ASSERT_EQUAL(strcmp(buf, "0.01"), 0);
- dm_snprintf(buf, sizeof(buf), "%.3f", dm_percent_to_round_float(n_0, 3));
+ (void) dm_snprintf(buf, sizeof(buf), "%.3f", dm_percent_to_round_float(n_0, 3));
T_ASSERT_EQUAL(strcmp(buf, "0.001"), 0);
- dm_snprintf(buf, sizeof(buf), "%d", (int)dm_percent_to_round_float(n_0, 0));
+ (void) dm_snprintf(buf, sizeof(buf), "%d", (int)dm_percent_to_round_float(n_0, 0));
T_ASSERT_EQUAL(strcmp(buf, "1"), 0);
}