some fixes to issues pointed by @tkoeppe

This commit is contained in:
Thomas Debesse 2018-01-28 01:34:30 +01:00
parent e3bf363a63
commit ba64802bb6
3 changed files with 2 additions and 3 deletions

View file

@ -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;
}

View file

@ -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" );
}
}

View file

@ -289,7 +289,6 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
f = fopen( filename, "rb" );
if ( f == NULL ) {
fclose( f );
return -1;
}