[FFmpeg-devel] [PATCHv2] avdevice/lavfi: fix self assignment warning

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Aug 23 16:04:50 CEST 2015


On Sun, Aug 23, 2015 at 4:16 AM, Nicolas George <george at nsup.org> wrote:
> Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit :
>> FAIL(ret) expands to statements including a silly ret=ret.
>> This triggers a -Wself-assign on confirmed clang 3.6, and so we fix it.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavdevice/lavfi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> No objection, although I find that warning a rather bad idea if it does not
> have checks to see if the code is part of a macro.

Agreed, I don't like the warning in this case either.
GCC toyed with the idea, but rejected the patch and AFAIK does not
have it currently:
https://gcc.gnu.org/ml/gcc-patches/2010-05/msg02296.html
Who knows, they might add it in future.

>
> Regards,
>
> --
>   Nicolas George
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list