@matheusbsbs / matheus-bagliano / commits / 310f8b5b6d
Fork 0

cleanups: Remove unused vars from combine-diff.c

Mod_type in particular sure looks like it wants to be used, but isn't. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Serge E. Hallyn committed Apr 17, 2006 at 10:14 UTC 310f8b5b6d17d805cb9a59a20ba747d5f093604a
1 file changed +2 -10
combine-diff.c
+2 -10
@@ -589,7 +589,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
589 struct diff_options *opt)
590 {
591 unsigned long result_size, cnt, lno;
592 - char *result, *cp, *ep;
592 + char *result, *cp;
593 struct sline *sline; /* survived lines */
594 int mode_differs = 0;
595 int i, show_hunks, shown_header = 0;
@@ -641,7 +641,6 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
641 cnt++; /* incomplete line */
642
643 sline = xcalloc(cnt+2, sizeof(*sline));
644 - ep = result;
644 sline[0].bol = result;
645 for (lno = 0; lno <= cnt + 1; lno++) {
646 sline[lno].lost_tail = &sline[lno].lost_head;
@@ -752,7 +751,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
751
752 static void show_raw_diff(struct combine_diff_path *p, int num_parent, const char *header, struct diff_options *opt)
753 {
755 - int i, offset, mod_type = 'A';
754 + int i, offset;
755 const char *prefix;
756 int line_termination, inter_name_termination;
757
@@ -764,13 +763,6 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, const cha
763 if (header)
764 printf("%s%c", header, line_termination);
765
767 - for (i = 0; i < num_parent; i++) {
768 - if (p->parent[i].mode)
769 - mod_type = 'M';
770 - }
771 - if (!p->mode)
772 - mod_type = 'D';
773 -
766 if (opt->output_format == DIFF_FORMAT_RAW) {
767 offset = strlen(COLONS) - num_parent;
768 if (offset < 0)