From: Jonathan Nieder Date: Mon, 28 Feb 2011 21:16:59 +0000 (-0600) Subject: fast-import: make code "-Wpointer-arith" clean X-Git-Tag: v1.7.5-rc0~3^2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6288e3e180c0b911e6f7062f1e744a25568f7d22;p=git.git fast-import: make code "-Wpointer-arith" clean The dereference() function to peel a tree-ish and find the underlying tree expects arithmetic to (void *) to work on byte addresses. We should be reading the text of objects through a char * anyway. Noticed-by: Junio C Hamano Signed-off-by: Jonathan Nieder --- diff --git a/fast-import.c b/fast-import.c index 6c37b8400..e1268b8cb 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2848,7 +2848,7 @@ static struct object_entry *dereference(struct object_entry *oe, unsigned char sha1[20]) { unsigned long size; - void *buf = NULL; + char *buf = NULL; if (!oe) { enum object_type type = sha1_object_info(sha1, NULL); if (type < 0)