Skip to content

Commit 6288e3e

Browse files
committed
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 <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]>
1 parent a62bbf8 commit 6288e3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@ static struct object_entry *dereference(struct object_entry *oe,
28482848
unsigned char sha1[20])
28492849
{
28502850
unsigned long size;
2851-
void *buf = NULL;
2851+
char *buf = NULL;
28522852
if (!oe) {
28532853
enum object_type type = sha1_object_info(sha1, NULL);
28542854
if (type < 0)

0 commit comments

Comments
 (0)