Remove all void-pointer arithmetic.
[git.git] / builtin-tar-tree.c
index f6310b9..c8527a3 100644 (file)
@@ -34,7 +34,7 @@ static void reliable_write(void *buf, unsigned long size)
                        die("git-tar-tree: disk full?");
                }
                size -= ret;
-               buf += ret;
+               buf = (char *) buf + ret;
        }
 }
 
@@ -87,13 +87,13 @@ static void write_blocked(void *buf, unsigned long size)
                memcpy(block + offset, buf, chunk);
                size -= chunk;
                offset += chunk;
-               buf += chunk;
+               buf = (char *) buf + chunk;
                write_if_needed();
        }
        while (size >= BLOCKSIZE) {
                reliable_write(buf, BLOCKSIZE);
                size -= BLOCKSIZE;
-               buf += BLOCKSIZE;
+               buf = (char *) buf + BLOCKSIZE;
        }
        if (size) {
                memcpy(block + offset, buf, size);