Merge pull request #592 from illwieckz/diffnoise

some fixes to issues pointed by @tkoeppe
This commit is contained in:
Timothee "TTimo" Besset 2018-02-03 13:48:59 -06:00 committed by GitHub
commit 1b755c86b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}