1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 23:16:11 +02:00

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 <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
Jonathan Nieder 2011-02-28 15:16:59 -06:00
parent a62bbf8f01
commit 6288e3e180

View File

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