Skip to content

Commit 310f8b5

Browse files
Serge E. HallynJunio C Hamano
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da2a95b commit 310f8b5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

combine-diff.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
589589
struct diff_options *opt)
590590
{
591591
unsigned long result_size, cnt, lno;
592-
char *result, *cp, *ep;
592+
char *result, *cp;
593593
struct sline *sline; /* survived lines */
594594
int mode_differs = 0;
595595
int i, show_hunks, shown_header = 0;
@@ -641,7 +641,6 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
641641
cnt++; /* incomplete line */
642642

643643
sline = xcalloc(cnt+2, sizeof(*sline));
644-
ep = result;
645644
sline[0].bol = result;
646645
for (lno = 0; lno <= cnt + 1; lno++) {
647646
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,
752751

753752
static void show_raw_diff(struct combine_diff_path *p, int num_parent, const char *header, struct diff_options *opt)
754753
{
755-
int i, offset, mod_type = 'A';
754+
int i, offset;
756755
const char *prefix;
757756
int line_termination, inter_name_termination;
758757

@@ -764,13 +763,6 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, const cha
764763
if (header)
765764
printf("%s%c", header, line_termination);
766765

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-
774766
if (opt->output_format == DIFF_FORMAT_RAW) {
775767
offset = strlen(COLONS) - num_parent;
776768
if (offset < 0)

0 commit comments

Comments
 (0)