From: Thomas Debesse Date: Sun, 28 Jan 2018 00:34:30 +0000 (+0100) Subject: some fixes to issues pointed by @tkoeppe X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=0a8e8e98c332c54c5a1cbc0a22b1e0483075a6b5 some fixes to issues pointed by @tkoeppe --- diff --git a/tools/quake3/common/threads.c b/tools/quake3/common/threads.c index 4f8951f1..054dc746 100644 --- a/tools/quake3/common/threads.c +++ b/tools/quake3/common/threads.c @@ -577,7 +577,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], &attr, (void *(*)(void *)) func, (void*)(size_t)i ) != 0 ) { + if ( pthread_create(&work_threads[i], &attr, (void *(*)(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 4e38c945..16a78289 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -316,7 +316,6 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){ f = fopen( filename, "rb" ); if ( f == NULL ) { - fclose( f ); return -1; }