From f7445865f260474082c8276dc2175ec23109c424 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 20 Jan 2022 15:12:03 +0000 Subject: reftable: check reftable_stack_auto_compact() return value Fixes a problem detected by Coverity. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- reftable/stack_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'reftable/stack_test.c') diff --git a/reftable/stack_test.c b/reftable/stack_test.c index eb0b7228b0..d628420e63 100644 --- a/reftable/stack_test.c +++ b/reftable/stack_test.c @@ -814,6 +814,7 @@ static void test_reftable_stack_auto_compaction(void) EXPECT_ERR(err); err = reftable_stack_auto_compact(st); + EXPECT_ERR(err); EXPECT(i < 3 || st->merged->stack_len < 2 * fastlog2(i)); } -- cgit v1.2.3 From f5f6a6cd47405f32c0217b980cb8ae1c5cce316c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 20 Jan 2022 15:12:04 +0000 Subject: reftable: ignore remove() return value in stack_test.c If the cleanup fails, there is nothing we can do. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- reftable/stack_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reftable/stack_test.c') diff --git a/reftable/stack_test.c b/reftable/stack_test.c index d628420e63..4b7292945c 100644 --- a/reftable/stack_test.c +++ b/reftable/stack_test.c @@ -89,7 +89,7 @@ static void test_read_file(void) EXPECT(0 == strcmp(want[i], names[i])); } free_names(names); - remove(fn); + (void) remove(fn); } static void test_parse_names(void) -- cgit v1.2.3