diff --git a/tools/quake3/common/polylib.c b/tools/quake3/common/polylib.c index ae565988..afdb9498 100644 --- a/tools/quake3/common/polylib.c +++ b/tools/quake3/common/polylib.c @@ -468,7 +468,7 @@ winding_t *CopyWinding( winding_t *w ){ } c = AllocWinding( w->numpoints ); - size = (size_t)sizeof( *w ) + sizeof( *w->p ) * w->numpoints; + size = sizeof( *w ) + sizeof( *w->p ) * w->numpoints; memcpy( c, w, size ); return c; } diff --git a/tools/quake3/common/threads.c b/tools/quake3/common/threads.c index eefa3484..89f24088 100644 --- a/tools/quake3/common/threads.c +++ b/tools/quake3/common/threads.c @@ -552,7 +552,7 @@ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){ for ( i = 0 ; i < numthreads ; i++ ) { /* Default pthread attributes: joinable & non-realtime scheduling */ - if ( pthread_create( &work_threads[i], NULL, (void*)func, (void*)(size_t)i ) != 0 ) { + if ( pthread_create( &work_threads[i], NULL, (void*)func, (void*)(uintptr_t)i ) != 0 ) { Error( "pthread_create failed" ); } } diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index f1f80435..e0c0ec85 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -289,7 +289,6 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){ f = fopen( filename, "rb" ); if ( f == NULL ) { - fclose( f ); return -1; }