{"thread":{"id":"5232","subject":"[PATCH] combine-diff.c remove unused return variable","startedAt":"2006-08-14T00:31:53Z","lastAt":"2006-08-14T01:27:06Z","messageCount":3,"participants":["dave rientjes","Junio C Hamano","David Rientjes"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25204","messageId":"Pine.LNX.4.63.0608131730470.24283@chino.corp.google.com","threadId":"5232","inReplyTo":null,"subject":"[PATCH] combine-diff.c remove unused return variable","fromName":"dave rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-14T00:31:53Z","receivedAt":"2006-08-14T00:31:53Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"Removes unused return variable.\n\n\t\tDavid\n\nSigned-off-by: David Rientjes <rientjes@google.com>\n\n---\n combine-diff.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/combine-diff.c b/combine-diff.c\nindex ba8baca..ed85b0e 100644\n--- a/combine-diff.c\n+++ b/combine-diff.c\n@@ -617,7 +617,7 @@ static int show_patch_diff(struct combin\n \tchar *result, *cp;\n \tstruct sline *sline; /* survived lines */\n \tint mode_differs = 0;\n-\tint i, show_hunks, shown_header = 0;\n+\tint i, show_hunks;\n \tint working_tree_file = !memcmp(elem->sha1, null_sha1, 20);\n \tint abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;\n \tmmfile_t result_file;\n@@ -769,7 +769,7 @@ static int show_patch_diff(struct combin\n \t}\n \tfree(sline[0].p_lno);\n \tfree(sline);\n-\treturn shown_header;\n+\treturn 0;\n }\n \n #define COLONS \"::::::::::::::::::::::::::::::::\"\n-- \n1.4.2.g182a\n"},{"id":"25205","messageId":"7voduogmfm.fsf@assigned-by-dhcp.cox.net","threadId":"5232","inReplyTo":"Pine.LNX.4.63.0608131730470.24283@chino.corp.google.com","subject":"Re: [PATCH] combine-diff.c remove unused return variable","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-14T01:01:33Z","receivedAt":"2006-08-14T01:01:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"dave rientjes <rientjes@google.com> writes:\n\n> Removes unused return variable.\n\nTrue.  Then making the function void would make more sense, like\nthis?\n\n\ndiff --git a/combine-diff.c b/combine-diff.c\nindex ba8baca..f2f3806 100644\n--- a/combine-diff.c\n+++ b/combine-diff.c\n@@ -609,15 +609,15 @@ static void dump_quoted_path(const char \n \tprintf(\"%s\\n\", c_reset);\n }\n \n-static int show_patch_diff(struct combine_diff_path *elem, int num_parent,\n-\t\t\t   int dense, struct rev_info *rev)\n+static void show_patch_diff(struct combine_diff_path *elem, int num_parent,\n+\t\t\t    int dense, struct rev_info *rev)\n {\n \tstruct diff_options *opt = &rev->diffopt;\n \tunsigned long result_size, cnt, lno;\n \tchar *result, *cp;\n \tstruct sline *sline; /* survived lines */\n \tint mode_differs = 0;\n-\tint i, show_hunks, shown_header = 0;\n+\tint i, show_hunks;\n \tint working_tree_file = !memcmp(elem->sha1, null_sha1, 20);\n \tint abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;\n \tmmfile_t result_file;\n@@ -769,7 +769,6 @@ static int show_patch_diff(struct combin\n \t}\n \tfree(sline[0].p_lno);\n \tfree(sline);\n-\treturn shown_header;\n }\n \n #define COLONS \"::::::::::::::::::::::::::::::::\"\n"},{"id":"25206","messageId":"9ec263480608131827j1a945016xaa9b7a1c8de41698@mail.google.com","threadId":"5232","inReplyTo":"7voduogmfm.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] combine-diff.c remove unused return variable","fromName":"David Rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-14T01:27:06Z","receivedAt":"2006-08-14T01:27:06Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"On 8/13/06, Junio C Hamano <junkio@cox.net> wrote:\n> dave rientjes <rientjes@google.com> writes:\n>\n> > Removes unused return variable.\n>\n> True.  Then making the function void would make more sense, like\n> this?\n>\n\nSure, as long as the author was not planning something for it later.\n\nDavid\n"}]}