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

[PATCH 2/2] Actually use retval

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 22, 2011, 12:50 UTC
Message-ID
<91afab0d46939238dd7c90ea2902b02cae083316.1300798069.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1300798069.git.johannes.schindelin@gmx.de>
This is most likely a bug. Nocited by gcc 4.6.0.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	Alternatively, retval's declaration and assignment can go.
 tree-diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tree-diff.c b/tree-diff.c
index 3954281..9e2dc70 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -58,7 +58,7 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2,
 		opt->change(opt, mode1, mode2, sha1, sha2, base->buf, 0, 0);
 	}
 	strbuf_setlen(base, old_baselen);
-	return 0;
+	return retval;
 }
 
 /* A whole sub-tree went away or appeared */
-- 
1.7.4.msysgit.0.167.ge91fd
Previous: Jonathan NiederNext: Junio C Hamano
Message 6 of 11 in “Fix issues found by gcc 4.6.0”
  1. 0/2 Fix issues found by gcc 4.6.0Johannes Schindelin, Mar 22, 2011
  2. 1/2 Remove unused variablesJohannes Schindelin, Mar 22, 2011
  3. Junio C HamanoMar 22, 2011
  4. Johannes SchindelinMar 22, 2011
  5. Jonathan NiederMar 22, 2011
  6. 2/2 Actually use retvalJohannes Schindelin, Mar 22, 2011
  7. Junio C HamanoMar 22, 2011
  8. Johannes SchindelinMar 22, 2011
  9. 0/2 Re: [PATCH 2/2] Actually use retvalJonathan Nieder, Mar 23, 2011
  10. 1/2 tree-diff: make diff_tree return voidJonathan Nieder, Mar 23, 2011
  11. 2/2 tree-diff: make diff_tree_sha1 return voidJonathan Nieder, Mar 23, 2011

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.