From 0a8e8e98c332c54c5a1cbc0a22b1e0483075a6b5 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 28 Jan 2018 01:34:30 +0100 Subject: [PATCH] some fixes to issues pointed by @tkoeppe --- tools/quake3/common/threads.c | 2 +- tools/quake3/common/vfs.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.39.2