Skip to content

Commit

Permalink
diff.c: work around pointer constness warnings
Browse files Browse the repository at this point in the history
The textconv leak fix introduced two invocations of free() to release
memory pointed by "const char *", which get annoying compiler warning.
  • Loading branch information
gitster committed Apr 9, 2010
1 parent b76c056 commit aed6ca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff.c
Expand Up @@ -551,9 +551,9 @@ static void emit_rewrite_diff(const char *name_a,
if (lc_b)
emit_rewrite_lines(&ecbdata, '+', data_two, size_two);
if (textconv_one)
free(data_one);
free((char *)data_one);
if (textconv_two)
free(data_two);
free((char *)data_two);
}

struct diff_words_buffer {
Expand Down

0 comments on commit aed6ca5

Please sign in to comment.