Skip to content

Commit

Permalink
Fix type-mismatch compiler warning from diff_populate_filespec()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Dec 18, 2008
1 parent 32738ed commit 0956a6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,8 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)

if (strbuf_readlink(&sb, s->path, s->size))
goto err_empty;
s->data = strbuf_detach(&sb, &s->size);
s->size = sb.len;
s->data = strbuf_detach(&sb, NULL);
s->should_free = 1;
return 0;
}
Expand Down

0 comments on commit 0956a6d

Please sign in to comment.