X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pack-redundant.c;h=41fb960569e1c7ed479fb123902752c552ff1341;hb=51d1e83f91a16363930023a5c39f79f270c04653;hp=1869b38b726b3760f279076af43006be9f1c5acf;hpb=59617ebb746b67921856c00a63f943d43b0abeea;p=git.git diff --git a/pack-redundant.c b/pack-redundant.c index 1869b38b7..41fb96056 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -45,7 +45,7 @@ static inline void llist_item_put(struct llist_item *item) free_nodes = item; } -static inline struct llist_item *llist_item_get() +static inline struct llist_item *llist_item_get(void) { struct llist_item *new; if ( free_nodes ) { @@ -246,12 +246,12 @@ static struct pack_list * pack_list_difference(const struct pack_list *A, static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2) { int p1_off, p2_off; - void *p1_base, *p2_base; + unsigned char *p1_base, *p2_base; struct llist_item *p1_hint = NULL, *p2_hint = NULL; - + p1_off = p2_off = 256 * 4 + 4; - p1_base = (void *)p1->pack->index_base; - p2_base = (void *)p2->pack->index_base; + p1_base = (unsigned char *) p1->pack->index_base; + p2_base = (unsigned char *) p2->pack->index_base; while (p1_off <= p1->pack->index_size - 3 * 20 && p2_off <= p2->pack->index_size - 3 * 20) @@ -275,7 +275,7 @@ static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2) } } -void pll_free(struct pll *l) +static void pll_free(struct pll *l) { struct pll *old; struct pack_list *opl; @@ -351,11 +351,11 @@ static size_t sizeof_union(struct packed_git *p1, struct packed_git *p2) { size_t ret = 0; int p1_off, p2_off; - void *p1_base, *p2_base; + char *p1_base, *p2_base; p1_off = p2_off = 256 * 4 + 4; - p1_base = (void *)p1->index_base; - p2_base = (void *)p2->index_base; + p1_base = (char *)p1->index_base; + p2_base = (char *)p2->index_base; while (p1_off <= p1->index_size - 3 * 20 && p2_off <= p2->index_size - 3 * 20) @@ -534,7 +534,7 @@ static struct pack_list * add_pack(struct packed_git *p) { struct pack_list l; size_t off; - void *base; + unsigned char *base; if (!p->pack_local && !(alt_odb || verbose)) return NULL; @@ -543,7 +543,7 @@ static struct pack_list * add_pack(struct packed_git *p) llist_init(&l.all_objects); off = 256 * 4 + 4; - base = (void *)p->index_base; + base = (unsigned char *)p->index_base; while (off <= p->index_size - 3 * 20) { llist_insert_back(l.all_objects, base + off); off += 24;