[vlc-devel] [PATCH] Fixed warning on assignment as a condition without parentheses.

Rafaël Carré funman at videolan.org
Mon Nov 18 13:34:33 CET 2013


Le 18/11/2013 09:52, Rémi Denis-Courmont a écrit :
> On Mon, 18 Nov 2013 11:44:50 +0400, Maxim Bublis <b at codemonkey.ru> wrote:
>> ---
>>  modules/demux/avi/libavi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
>> index 43db2e5..b48516e 100644
>> --- a/modules/demux/avi/libavi.c
>> +++ b/modules/demux/avi/libavi.c
>> @@ -174,7 +174,7 @@ static int AVI_ChunkRead_list( stream_t *s,
>> avi_chunk_t *p_container )
>>          }
>>          p_container->common.p_last = p_chk;
>>  
>> -        if( i_ret = AVI_ChunkRead( s, p_chk, p_container ) )
>> +        if( (i_ret = AVI_ChunkRead( s, p_chk, p_container )) )
> 
> Unless syntactically necessary (e.g. while()), I think it is recommended
> to split the assignment and the condition in separate statements.

I agree.

>>          {
>>              break;
>>          }
> 




More information about the vlc-devel mailing list