]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
some fixes to issues pointed by @tkoeppe
authorThomas Debesse <dev@illwieckz.net>
Sun, 28 Jan 2018 00:34:30 +0000 (01:34 +0100)
committerThomas Debesse <dev@illwieckz.net>
Sun, 28 Jan 2018 02:17:29 +0000 (03:17 +0100)
tools/quake3/common/threads.c
tools/quake3/common/vfs.c

index 4f8951f19479278b1017018896be39a3ae8623be..054dc746625ef214d0b73ecc65793160db865cc6 100644 (file)
@@ -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" );
                        }
                }
index 4e38c9458a3153abedf69689b262e750e4afadff..16a78289817b017de067257c6690ada8feed61b8 100644 (file)
@@ -316,7 +316,6 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
 
                f = fopen( filename, "rb" );
                if ( f == NULL ) {
-                       fclose( f );
                        return -1;
                }