aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/disktail.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-12-14 12:14:56 +0800
committerChris Lahey <clahey@src.gnome.org>2000-12-14 12:14:56 +0800
commit8bee19374da063f3600d3eb31cc9ec377392bef1 (patch)
tree8222e21baaef50ae93802772c7adee38b68eb24c /libibex/disktail.c
parent166e630ba2ee632ef8ca9a7818601097841294bd (diff)
downloadgsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar.gz
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar.bz2
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar.lz
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar.xz
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.tar.zst
gsoc2013-evolution-8bee19374da063f3600d3eb31cc9ec377392bef1.zip
Added some casts to get rid of warnings. (tail_dump): #if 0ed this out to
2000-12-13 Christopher James Lahey <clahey@helixcode.com> * disktail.c (tail_compress): (tail_get): Added some casts to get rid of warnings. (tail_dump): #if 0ed this out to get rid of a warning. (ibex_diskarray_dump): Added a prototype. * ibex_block.c (ibex_index_buffer): Assigned cat the value 0 to start off with to avoid a warning. svn path=/trunk/; revision=6993
Diffstat (limited to 'libibex/disktail.c')
-rw-r--r--libibex/disktail.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libibex/disktail.c b/libibex/disktail.c
index 9f5a0dbea2..88f5ca6c55 100644
--- a/libibex/disktail.c
+++ b/libibex/disktail.c
@@ -173,8 +173,8 @@ tail_compress(struct _tailblock *bucket, int index, int newsize)
g_assert(newstart+(end-start)-newsize <= &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])]);
g_assert(newstart + (start-newstart) + MIN(end-start, newsize) <= &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])]);
- g_assert(newstart+(end-start)-newsize >= &bucket->tb_offset[bucket->used]);
- g_assert(newstart + (start-newstart) + MIN(end-start, newsize) >= &bucket->tb_offset[bucket->used]);
+ g_assert(newstart+(end-start)-newsize >= (blockid_t *) &bucket->tb_offset[bucket->used]);
+ g_assert(newstart + (start-newstart) + MIN(end-start, newsize) >= (blockid_t *) &bucket->tb_offset[bucket->used]);
memmove(newstart+(end-start)-newsize, newstart, ((start-newstart)+MIN(end-start, newsize)) * sizeof(blockid_t));
@@ -198,6 +198,7 @@ tail_space(struct _tailblock *tail)
- (blockid_t *)&tail->tb_offset[tail->used];
}
+#if 0
static void
tail_dump(struct _memcache *blocks, blockid_t tailid)
{
@@ -210,6 +211,7 @@ tail_dump(struct _memcache *blocks, blockid_t tailid)
}
printf("\n");
}
+#endif
static blockid_t
tail_get(struct _memcache *blocks, int size)
@@ -240,13 +242,13 @@ tail_get(struct _memcache *blocks, int size)
ibex_block_dirty((struct _block *)tail);
g_assert(&tail->tb_offset[tail->used-1]
- < &tail->tb_data[tail->tb_offset[tail->used-1]]);
+ < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
return tailid;
}
g_assert(&tail->tb_offset[tail->used-1]
- < &tail->tb_data[tail->tb_offset[tail->used-1]]);
+ < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
/* see if we have a free slot first */
freeindex = -1;
@@ -297,7 +299,7 @@ tail_get(struct _memcache *blocks, int size)
d(printf("allocated %d (%d), used %d\n", tailid, TAIL_KEY(tailid, 0), tail->used));
g_assert(&tail->tb_offset[tail->used-1]
- < &tail->tb_data[tail->tb_offset[tail->used-1]]);
+ < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
return TAIL_KEY(tailid, 0);
}
@@ -730,6 +732,8 @@ disk_get(struct _IBEXStore *store, blockid_t head, blockid_t tail)
return result;
}
+void ibex_diskarray_dump(struct _memcache *blocks, blockid_t head, blockid_t tail);
+
void
ibex_diskarray_dump(struct _memcache *blocks, blockid_t head, blockid_t tail)
{