diff.c: work around pointer constness warnings

The textconv leak fix introduced two invocations of free() to release
memory pointed by "const char *", which get annoying compiler warning.
This commit is contained in:
Junio C Hamano 2010-04-08 23:30:49 -07:00
parent b76c056b95
commit aed6ca52e7

4
diff.c
View File

@ -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 {