git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/6] fixup! reftable: rest of library

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 28, 2020, 06:44 UTC
Message-ID
<58f2b0394546e8da2922adcbc38bdb6b53f2b313.1606545878.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.801.git.1606545878.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
0-sized arrays are actually not portable.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 reftable/stack_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/reftable/stack_test.c b/reftable/stack_test.c
index c35abd7301..cf2e32a25c 100644
--- a/reftable/stack_test.c
+++ b/reftable/stack_test.c
@@ -579,11 +579,11 @@ static void test_sizes_to_segments(void)
 
 static void test_sizes_to_segments_empty(void)
 {
-	uint64_t sizes[0];
+	uint64_t sizes[1];
 
 	int seglen = 0;
 	struct segment *segs =
-		sizes_to_segments(&seglen, sizes, ARRAY_SIZE(sizes));
+		sizes_to_segments(&seglen, sizes, 0);
 	EXPECT(seglen == 0);
 	reftable_free(segs);
 }
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Jeff King
Message 16 of 22 in “Minimal patches to let reftable pass the CI builds”
  1. 0/6 Minimal patches to let reftable pass the CI buildsJohannes Schindelin via GitGitGadget, Nov 28, 2020
  2. 1/6 fixup! reftable: rest of libraryJohannes Schindelin via GitGitGadget, Nov 28, 2020
  3. Han-Wen NienhuysDec 1, 2020
  4. Johannes SchindelinDec 2, 2020
  5. Reftable locking on Windows (Re: [PATCH 1/6] fixup! reftable: rest of library)Han-Wen Nienhuys, Dec 2, 2020
  6. Ævar Arnfjörð BjarmasonDec 3, 2020
  7. Han-Wen NienhuysDec 3, 2020
  8. 6/6 fixup! reftable: rest of libraryJohannes Schindelin via GitGitGadget, Nov 28, 2020
  9. Jeff KingDec 1, 2020
  10. Johannes SchindelinDec 1, 2020
  11. Jeff KingDec 2, 2020
  12. Han-Wen NienhuysDec 2, 2020
  13. Jeff KingDec 2, 2020
  14. 4/6 fixup! reftable: rest of libraryJohannes Schindelin via GitGitGadget, Nov 28, 2020
  15. 2/6 fixup! reftable: utility functionsJohannes Schindelin via GitGitGadget, Nov 28, 2020
  16. 3/6 fixup! reftable: rest of libraryJohannes Schindelin via GitGitGadget, Nov 28, 2020
  17. Jeff KingDec 1, 2020
  18. Han-Wen NienhuysDec 1, 2020
  19. Jeff KingDec 1, 2020
  20. 5/6 fixup! reftable: rest of libraryJohannes Schindelin via GitGitGadget, Nov 28, 2020
  21. Han-Wen NienhuysNov 30, 2020
  22. Johannes SchindelinDec 1, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.