[FFmpeg-devel] [PATCH] avfilter/buffersrc: add av_warn_unused_result attributes

Ronald S. Bultje rsbultje at gmail.com
Tue Oct 6 14:42:58 CEST 2015


Hi,

On Tue, Oct 6, 2015 at 4:01 AM, Nicolas George <george at nsup.org> wrote:

> Le quartidi 14 vendémiaire, an CCXXIV, Ganesh Ajjanagadde a écrit :
> > This adds av_warn_unused_result whenever it is relevant.
> >
> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> > ---
> >  libavfilter/buffersrc.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
>
> I do not have much of an opinion about this. It looks right in principle,
> but warnings sometimes have unexpected advert effects.


Let's keep an eye out for where we want to apply it. I think these specific
ones are OK.


> > -int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src,
> > +av_warn_unused_result int av_buffersrc_add_frame_flags(AVFilterContext
> *buffer_src,
> >                                   AVFrame *frame, int flags);
>
> It is a bit sad to break alignment, though. I would slightly prefer having
> the long attribute on a line by itself:
>
> av_warn_unused_result
> int av_yada_yada_yada(argu *ments);
>
> ... if people are ok with it too. Otherwise, reindenting with the same
> commit seems acceptable in this case.


I think we use the "previous line" approach for e.g. deprecations also, so
it sounds fine with me.

(Otherwise patch OK with me.)

Ronald


More information about the ffmpeg-devel mailing list