Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Forster <octo@verplant.org>2006-06-18 19:18:09 +0400
committerJunio C Hamano <junkio@cox.net>2006-06-20 12:59:46 +0400
commit1d7f171c3a456b980d821ee0f68e01535a5f7e36 (patch)
tree040ae96db3e2d18f84a95cc46ec4d7626bcc1994 /pack-redundant.c
parent2bda77e080dd8d47ca0b87c78e9061fbaa37455a (diff)
Remove all void-pointer arithmetic.
ANSI C99 doesn't allow void-pointer arithmetic. This patch fixes this in various ways. Usually the strategy that required the least changes was used. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack-redundant.c')
-rw-r--r--pack-redundant.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/pack-redundant.c b/pack-redundant.c
index cd81f5a66e..41fb960569 100644
--- a/pack-redundant.c
+++ b/pack-redundant.c
@@ -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)
@@ -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;