Skip to content

Commit 0956a6d

Browse files
René Scharfegitster
authored andcommitted
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 <[email protected]>
1 parent 32738ed commit 0956a6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

diff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,8 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
17781778

17791779
if (strbuf_readlink(&sb, s->path, s->size))
17801780
goto err_empty;
1781-
s->data = strbuf_detach(&sb, &s->size);
1781+
s->size = sb.len;
1782+
s->data = strbuf_detach(&sb, NULL);
17821783
s->should_free = 1;
17831784
return 0;
17841785
}

0 commit comments

Comments
 (0)