From 780b62679560f15e2201ae42a28de77346729b7e Mon Sep 17 00:00:00 2001 From: Ray Lehtiniemi Date: Tue, 7 Apr 2009 16:50:17 -0600 Subject: [PATCH] =?utf8?q?Fix=20warning:=20pointer=20of=20type=20=E2=80=98vo?= =?utf8?q?id=20*=E2=80=99=20used=20in=20arithmetic?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ray Lehtiniemi --- src/framework/mlt_pool.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/framework/mlt_pool.c b/src/framework/mlt_pool.c index b708f87..ebf0081 100644 --- a/src/framework/mlt_pool.c +++ b/src/framework/mlt_pool.c @@ -137,7 +137,7 @@ static void *pool_fetch( mlt_pool this ) release->references = 1; // Determine the ptr - ptr = ( void * )release + sizeof( struct mlt_release_s ); + ptr = ( char * )release + sizeof( struct mlt_release_s ); } } @@ -161,7 +161,7 @@ static void pool_return( void *ptr ) if ( ptr != NULL ) { // Get the release pointer - mlt_release that = ptr - sizeof( struct mlt_release_s ); + mlt_release that = ( void * )(( char * )ptr - sizeof( struct mlt_release_s )); // Get the pool mlt_pool this = that->pool; @@ -186,7 +186,7 @@ static void pool_return( void *ptr ) if ( ptr != NULL ) { // Free the release itself - free( ptr - sizeof( struct mlt_release_s ) ); + free( ( char * )ptr - sizeof( struct mlt_release_s ) ); } } @@ -207,7 +207,7 @@ static void pool_close( mlt_pool this ) while ( ( release = mlt_deque_pop_back( this->stack ) ) != NULL ) { // We'll free this item now - free( release - sizeof( struct mlt_release_s ) ); + free( ( char * )release - sizeof( struct mlt_release_s ) ); } // We can now close the stack @@ -293,7 +293,7 @@ void *mlt_pool_realloc( void *ptr, int size ) if ( ptr != NULL ) { // Get the release pointer - mlt_release that = ptr - sizeof( struct mlt_release_s ); + mlt_release that = ( void * )(( char * )ptr - sizeof( struct mlt_release_s )); // If the current pool this ptr belongs to is big enough if ( size > that->pool->size - sizeof( struct mlt_release_s ) ) @@ -346,7 +346,7 @@ void mlt_pool_purge( ) // We'll free all unused items now while ( ( release = mlt_deque_pop_back( this->stack ) ) != NULL ) - free( release - sizeof( struct mlt_release_s ) ); + free( ( char * )release - sizeof( struct mlt_release_s ) ); // Unlock the pool pthread_mutex_unlock( &this->lock ); -- 1.7.4.4