Commit 50aadebc authored by Loren Merritt's avatar Loren Merritt

silence some gcc warnings



git-svn-id: svn://svn.videolan.org/x264/trunk@480 df754926-b1dd-0310-bc7b-ec298dee348c
parent 5b6c5eff
......@@ -51,7 +51,8 @@
#define pthread_t thread_id
#define pthread_create(t,u,f,d) { *(t)=spawn_thread(f,"",10,d); \
resume_thread(*(t)); }
#define pthread_join(t,s) wait_for_thread(t,(long*)s)
#define pthread_join(t,s) { long tmp; \
wait_for_thread(t,(s)?(long*)(s):&tmp); }
#define HAVE_PTHREAD 1
#elif defined(HAVE_PTHREAD)
......
......@@ -690,10 +690,10 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a )
}
else if( h->mb.i_type == I_4x4 )
{
uint32_t pels[4] = {0}; // doesn't need initting, just shuts up a gcc warning
int i_nnz = 0;
for( idx = 0; idx < 16; idx++ )
{
uint32_t pels[4];
int i_nnz = 0;
uint8_t *p_src_by;
uint8_t *p_dst_by;
i_best = COST_MAX;
......
......@@ -1099,11 +1099,10 @@ static inline int x264_slices_write( x264_t *h )
#ifdef HAVE_PTHREAD
{
pthread_t handles[X264_SLICE_MAX];
void *status;
for( i = 0; i < h->param.i_threads; i++ )
pthread_create( &handles[i], NULL, (void*)x264_slice_write, (void*)h->thread[i] );
for( i = 0; i < h->param.i_threads; i++ )
pthread_join( handles[i], &status );
pthread_join( handles[i], NULL );
}
#else
for( i = 0; i < h->param.i_threads; i++ )
......
......@@ -50,6 +50,7 @@
#define sqrtf sqrt
#endif
#ifdef WIN32 // POSIX says that rename() removes the destination, but win32 doesn't.
#include <unistd.h>
#define rename(src,dst) (unlink(dst), rename(src,dst))
#endif
......
......@@ -350,7 +350,7 @@ typedef struct
GF_AVCConfig *p_config;
GF_ISOSample *p_sample;
int i_track;
int i_descidx;
uint32_t i_descidx;
int i_time_inc;
int i_time_res;
int i_numframe;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment