Thread (7 messages) flat view 7 messages, 3 authors, 2021-09-02
STALE1815d

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

From: Carlo Marcelo Arenas Belón <hidden>
Date: 2021-09-02 05:30:43
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help