@matheusbsbs / matheus-bagliano / commits / 89b0c4b5a3
Fork 0

Fix type of combine-diff.c::show_patch_diff()

The other function, show_raw_diff() is void and no callers use return value from neither. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Aug 13, 2006 at 19:19 UTC 89b0c4b5a3a9d026d9adb30d4e896965e480725e
1 file changed +5 -7
combine-diff.c
+5 -7
@@ -609,15 +609,15 @@ static void dump_quoted_path(const char *prefix, const char *path,
609 printf("%s\n", c_reset);
610 }
611
612 -static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
613 - int dense, struct rev_info *rev)
612 +static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
613 + int dense, struct rev_info *rev)
614 {
615 struct diff_options *opt = &rev->diffopt;
616 unsigned long result_size, cnt, lno;
617 char *result, *cp;
618 struct sline *sline; /* survived lines */
619 int mode_differs = 0;
620 - int i, show_hunks, shown_header = 0;
620 + int i, show_hunks;
621 int working_tree_file = !memcmp(elem->sha1, null_sha1, 20);
622 int abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;
623 mmfile_t result_file;
@@ -769,7 +769,6 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
769 }
770 free(sline[0].p_lno);
771 free(sline);
772 - return shown_header;
772 }
773
774 #define COLONS "::::::::::::::::::::::::::::::::"
@@ -837,11 +836,10 @@ void show_combined_diff(struct combine_diff_path *p,
836 return;
837 if (opt->output_format & (DIFF_FORMAT_RAW |
838 DIFF_FORMAT_NAME |
840 - DIFF_FORMAT_NAME_STATUS)) {
839 + DIFF_FORMAT_NAME_STATUS))
840 show_raw_diff(p, num_parent, rev);
842 - } else if (opt->output_format & DIFF_FORMAT_PATCH) {
841 + else if (opt->output_format & DIFF_FORMAT_PATCH)
842 show_patch_diff(p, num_parent, dense, rev);
844 - }
843 }
844
845 void diff_tree_combined(const unsigned char *sha1,