Fix type-mismatch compiler warning from diff_populate_filespec()
The type of the size member of filespec is ulong, while strbuf_detach expects a size_t pointer. This patch should fix the warning: Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
32738edfca
commit
0956a6db7a
3
diff.c
3
diff.c
@ -1778,7 +1778,8 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
|
|||||||
|
|
||||||
if (strbuf_readlink(&sb, s->path, s->size))
|
if (strbuf_readlink(&sb, s->path, s->size))
|
||||||
goto err_empty;
|
goto err_empty;
|
||||||
s->data = strbuf_detach(&sb, &s->size);
|
s->size = sb.len;
|
||||||
|
s->data = strbuf_detach(&sb, NULL);
|
||||||
s->should_free = 1;
|
s->should_free = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user