aboutsummaryrefslogtreecommitdiffhomepage
path: root/halloc.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-03-29 10:14:50 +1000
committerGravatar axel <axel@liljencrantz.se>2006-03-29 10:14:50 +1000
commit13a51ba4c2301460d62502d66c6a7c8e020749d1 (patch)
tree7d1dfc5a2dc5f45f5973d2a24234d544d70262c1 /halloc.c
parent749dad1309583b49cd871173678f6fa3d6283496 (diff)
Fix warnings from ICC
darcs-hash:20060329001450-ac50b-9c3fe4f7ca14a077997c421616c07dde03b48c6d.gz
Diffstat (limited to 'halloc.c')
-rw-r--r--halloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/halloc.c b/halloc.c
index dbfbf8eb..85855daa 100644
--- a/halloc.c
+++ b/halloc.c
@@ -41,7 +41,7 @@ typedef struct halloc
static halloc_t *halloc_from_data( void *data )
{
- return (halloc_t *)(data - sizeof( halloc_t ) );
+ return (halloc_t *)(((char *)data) - sizeof( halloc_t ) );
}
static void late_free( void *data)
@@ -83,7 +83,7 @@ void *halloc( void *context, size_t size )
{
res = parent->scratch;
parent->scratch_free -= size;
- parent->scratch += size;
+ parent->scratch = ((char *)parent->scratch)+size;
}
else
{
@@ -98,7 +98,7 @@ void *halloc( void *context, size_t size )
alloc_spill += parent->scratch_free;
#endif
res = calloc( 1, size + HALLOC_BLOCK_SIZE );
- parent->scratch = res + size;
+ parent->scratch = (char *)res + size;
parent->scratch_free = HALLOC_BLOCK_SIZE;
}
else
@@ -121,7 +121,7 @@ void *halloc( void *context, size_t size )
#ifdef HALLOC_DEBUG
parent_count++;
#endif
- me->scratch = ((void *)me) + sizeof(halloc_t) + size;
+ me->scratch = ((char *)me) + sizeof(halloc_t) + size;
me->scratch_free = HALLOC_BLOCK_SIZE;
al_init( &me->children );