@matheusbsbs / matheus-bagliano / commits / 6288e3e180
Fork 0

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>

Jonathan Nieder committed Feb 28, 2011 at 15:16 UTC 6288e3e180c0b911e6f7062f1e744a25568f7d22
1 file changed +1 -1
fast-import.c
+1 -1
@@ -2848,7 +2848,7 @@ static struct object_entry *dereference(struct object_entry *oe,
2848 unsigned char sha1[20])
2849 {
2850 unsigned long size;
2851 - void *buf = NULL;
2851 + char *buf = NULL;
2852 if (!oe) {
2853 enum object_type type = sha1_object_info(sha1, NULL);
2854 if (type < 0)