From 71f4e344fa1361ec1d3195818c23ac48cd1f4393 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Tue, 7 May 2013 22:36:03 -0700 Subject: [PATCH] Fix some compile warnings raised by clang. --- src/modules/core/producer_melt.c | 4 ++-- src/modules/rtaudio/RtAudio.cpp | 2 +- src/modules/xine/deinterlace.c | 12 ++++++------ src/modules/xml/producer_xml.c | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/modules/core/producer_melt.c b/src/modules/core/producer_melt.c index b3ba3a14..afc8e4c2 100644 --- a/src/modules/core/producer_melt.c +++ b/src/modules/core/producer_melt.c @@ -463,8 +463,8 @@ mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, con track_service( field, playlist, ( mlt_destructor )mlt_playlist_close ); // We must have a playlist to connect - if ( playlist && !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) || - mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) + if ( ( playlist && !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ) || + mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track ); mlt_producer prod = MLT_TRACTOR_PRODUCER( tractor ); diff --git a/src/modules/rtaudio/RtAudio.cpp b/src/modules/rtaudio/RtAudio.cpp index 422a7841..94275e36 100644 --- a/src/modules/rtaudio/RtAudio.cpp +++ b/src/modules/rtaudio/RtAudio.cpp @@ -1076,7 +1076,7 @@ bool RtApiCore :: probeDeviceOpen( unsigned int device, StreamMode mode, unsigne // We'll try higher bit rates first and then work our way down. std::vector< std::pair > physicalFormats; - formatFlags = description.mFormatFlags | kLinearPCMFormatFlagIsFloat & ~kLinearPCMFormatFlagIsSignedInteger; + formatFlags = (description.mFormatFlags | kLinearPCMFormatFlagIsFloat) & ~kLinearPCMFormatFlagIsSignedInteger; physicalFormats.push_back( std::pair( 32, formatFlags ) ); formatFlags = (description.mFormatFlags | kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked) & ~kLinearPCMFormatFlagIsFloat; physicalFormats.push_back( std::pair( 32, formatFlags ) ); diff --git a/src/modules/xine/deinterlace.c b/src/modules/xine/deinterlace.c index 89194abc..eddbb691 100644 --- a/src/modules/xine/deinterlace.c +++ b/src/modules/xine/deinterlace.c @@ -66,8 +66,8 @@ static void deinterlace_bob_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], uint64_t qwEdgeDetect; uint64_t qwThreshold; - static mmx_t YMask = {ub:{0xff,0,0xff,0,0xff,0,0xff,0}}; - static mmx_t Mask = {ub:{0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; + static mmx_t YMask = {.ub={0xff,0,0xff,0,0xff,0,0xff,0}}; + static mmx_t Mask = {.ub={0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; qwEdgeDetect = EdgeDetect; qwEdgeDetect += (qwEdgeDetect << 48) + (qwEdgeDetect << 32) + (qwEdgeDetect << 16); @@ -217,8 +217,8 @@ static int deinterlace_weave_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], uint64_t qwTemporalTolerance; uint64_t qwThreshold; - static mmx_t YMask = {ub:{0xff,0,0xff,0,0xff,0,0xff,0}}; - static mmx_t Mask = {ub:{0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; + static mmx_t YMask = {.ub={0xff,0,0xff,0,0xff,0,0xff,0}}; + static mmx_t Mask = {.ub={0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; // Make sure we have all the data we need. @@ -402,7 +402,7 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], uint8_t* pOddLines = psrc[0]+width; uint8_t* pPrevLines; - static mmx_t ShiftMask = {ub:{0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; + static mmx_t ShiftMask = {.ub={0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; int LineLength = width; int SourcePitch = width * 2; @@ -566,7 +566,7 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], int n; - static mmx_t Mask = {ub:{0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; + static mmx_t Mask = {.ub={0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; /* * copy first even line no matter what, and the first odd line if we're diff --git a/src/modules/xml/producer_xml.c b/src/modules/xml/producer_xml.c index af82e455..526e95c9 100644 --- a/src/modules/xml/producer_xml.c +++ b/src/modules/xml/producer_xml.c @@ -154,7 +154,7 @@ static mlt_service context_pop_service( deserialise_context context, enum servic { mlt_service result = NULL; - if ( type ) *type = invalid_type; + if ( type ) *type = mlt_invalid_type; if ( context->stack_service_size > 0 ) { result = context->stack_service[ -- context->stack_service_size ]; @@ -731,7 +731,7 @@ static void on_start_entry( deserialise_context context, const xmlChar *name, co if ( mlt_properties_get_data( temp, "producer", NULL ) != NULL ) { mlt_playlist_clip_info info; - enum service_type parent_type = invalid_type; + enum service_type parent_type = mlt_invalid_type; mlt_service parent = context_pop_service( context, &parent_type ); mlt_producer producer = mlt_properties_get_data( temp, "producer", NULL ); @@ -774,7 +774,7 @@ static void on_start_entry( deserialise_context context, const xmlChar *name, co static void on_end_entry( deserialise_context context, const xmlChar *name ) { // Get the entry from the stack - enum service_type entry_type = invalid_type; + enum service_type entry_type = mlt_invalid_type; mlt_service entry = context_pop_service( context, &entry_type ); if ( entry == NULL && entry_type != mlt_entry_type ) @@ -817,7 +817,7 @@ static void on_end_track( deserialise_context context, const xmlChar *name ) if ( track != NULL && track_type == mlt_entry_type ) { mlt_properties track_props = MLT_SERVICE_PROPERTIES( track ); - enum service_type parent_type = invalid_type; + enum service_type parent_type = mlt_invalid_type; mlt_service parent = context_pop_service( context, &parent_type ); mlt_multitrack multitrack = NULL; @@ -903,7 +903,7 @@ static void on_end_filter( deserialise_context context, const xmlChar *name ) mlt_service service = context_pop_service( context, &type ); mlt_properties properties = MLT_SERVICE_PROPERTIES( service ); - enum service_type parent_type = invalid_type; + enum service_type parent_type = mlt_invalid_type; mlt_service parent = context_pop_service( context, &parent_type ); if ( service != NULL && type == mlt_dummy_filter_type ) @@ -993,7 +993,7 @@ static void on_end_transition( deserialise_context context, const xmlChar *name mlt_service service = context_pop_service( context, &type ); mlt_properties properties = MLT_SERVICE_PROPERTIES( service ); - enum service_type parent_type = invalid_type; + enum service_type parent_type = mlt_invalid_type; mlt_service parent = context_pop_service( context, &parent_type ); if ( service != NULL && type == mlt_dummy_transition_type ) -- 2.39.2