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

[PATCH 1/3] fixup! refs: RFC: Reftable support for git-core

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Sep 2, 2021, 05:30 UTC
Message-ID
<20210902053023.44006-2-carenas@gmail.com>
In-Reply-To
<20210902053023.44006-1-carenas@gmail.com>

need to reorder the variables to hopefully make it easier to see why they might not be used since assert will compile out itself with -DNDEBUG.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 refs/reftable-backend.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index 61ee144e19..5d733b0496 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -127,10 +127,11 @@ static void clear_reftable_log_record(struct reftable_log_record *log)
 
 static void fill_reftable_log_record(struct reftable_log_record *log)
 {
-	const char *info = git_committer_info(0);
 	struct ident_split split = { NULL };
-	int result = split_ident_line(&split, info, strlen(info));
 	int sign = 1;
+	MAYBE_UNUSED const char *info = git_committer_info(0);
+	MAYBE_UNUSED int result = split_ident_line(&split, info, strlen(info));
+
 	assert(0 == result);
 
 	reftable_log_record_release(log);
-- 
2.33.0.481.g26d3bed244
Previous: Carlo Marcelo Arenas BelónNext: Jeff King
Message 2 of 10 in “hn/reftable: fixes for building with -DNDEBUG”
  1. 0/3 hn/reftable: fixes for building with -DNDEBUGCarlo Marcelo Arenas Belón, Sep 2, 2021
  2. 1/3 fixup! refs: RFC: Reftable support for git-coreCarlo Marcelo Arenas Belón, Sep 2, 2021
  3. Jeff KingSep 2, 2021
  4. Han-Wen NienhuysSep 2, 2021
  5. 2/3 fixup! reftable: add merged table viewCarlo Marcelo Arenas Belón, Sep 2, 2021
  6. 3/3 fixup! reftable: add a heap-based priority queue for reftable recordsCarlo Marcelo Arenas Belón, Sep 2, 2021
  7. Jeff KingSep 2, 2021
  8. Junio C HamanoSep 2, 2021
  9. Jeff KingSep 2, 2021
  10. Junio C HamanoSep 3, 2021

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.