From: Loren Merritt Date: Sat, 25 Mar 2006 10:06:15 +0000 (+0000) Subject: silence some gcc warnings X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=50aadebc2de139f2003314bfbeea7d7ce1680901;p=x264.git silence some gcc warnings git-svn-id: svn://svn.videolan.org/x264/trunk@480 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/common.h b/common/common.h index 8ae1b55e..3465cb65 100644 --- a/common/common.h +++ b/common/common.h @@ -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) diff --git a/encoder/analyse.c b/encoder/analyse.c index af35e26a..8b90a2a8 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -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; diff --git a/encoder/encoder.c b/encoder/encoder.c index 59a049c8..bdfd74b9 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -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++ ) diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index c0b12cf3..df581212 100644 --- a/encoder/ratecontrol.c +++ b/encoder/ratecontrol.c @@ -50,6 +50,7 @@ #define sqrtf sqrt #endif #ifdef WIN32 // POSIX says that rename() removes the destination, but win32 doesn't. +#include #define rename(src,dst) (unlink(dst), rename(src,dst)) #endif diff --git a/muxers.c b/muxers.c index 5fab68d8..f8526974 100644 --- a/muxers.c +++ b/muxers.c @@ -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;