[FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_filter: add a return at the end of non-void functions

James Almer jamrial at gmail.com
Fri Aug 6 16:37:46 EEST 2021


On 8/6/2021 10:31 AM, James Almer wrote:
> Fixes compilation with GCC 11 when configured with --disable-optimizations

Changed into "with --disable-optimizations --toolchain=gcc-tsan" because 
i just noticed the former alone is not enough to trigger this.

> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>   fftools/ffmpeg_filter.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
> index 94838adc56..49076f13ee 100644
> --- a/fftools/ffmpeg_filter.c
> +++ b/fftools/ffmpeg_filter.c
> @@ -628,7 +628,7 @@ static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter,
>       switch (avfilter_pad_get_type(out->filter_ctx->output_pads, out->pad_idx)) {
>       case AVMEDIA_TYPE_VIDEO: return configure_output_video_filter(fg, ofilter, out);
>       case AVMEDIA_TYPE_AUDIO: return configure_output_audio_filter(fg, ofilter, out);
> -    default: av_assert0(0);
> +    default: av_assert0(0); return 0;
>       }
>   }
>   
> @@ -938,7 +938,7 @@ static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter,
>       switch (avfilter_pad_get_type(in->filter_ctx->input_pads, in->pad_idx)) {
>       case AVMEDIA_TYPE_VIDEO: return configure_input_video_filter(fg, ifilter, in);
>       case AVMEDIA_TYPE_AUDIO: return configure_input_audio_filter(fg, ifilter, in);
> -    default: av_assert0(0);
> +    default: av_assert0(0); return 0;
>       }
>   }
>   
> 



More information about the ffmpeg-devel mailing list