On Sun, 27 Oct 2013 00:54:18 +0200, Vittorio Giovara <[email protected]> wrote: > avfilter_next is used by avfilter_get_by_name which drops const anyway > --- > OCD count = -3 warnings > Vittorio > > libavfilter/avfilter.c | 4 ++-- > libavfilter/avfilter.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c > index 88e39bf..203e485 100644 > --- a/libavfilter/avfilter.c > +++ b/libavfilter/avfilter.c > @@ -279,7 +279,7 @@ AVFilter *avfilter_get_by_name(const char *name) > if (!name) > return NULL; > > - while ((f = avfilter_next(f))) > + while ((f = avfilter_next((const AVFilter *)f))) > if (!strcmp(f->name, name)) > return f; > > @@ -296,7 +296,7 @@ int avfilter_register(AVFilter *filter) > return 0; > } > > -const AVFilter *avfilter_next(const AVFilter *prev) > +AVFilter *avfilter_next(const AVFilter *prev) > { > return prev ? prev->next : first_filter; > } > diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h > index ca11be9..fd3f9a2 100644 > --- a/libavfilter/avfilter.h > +++ b/libavfilter/avfilter.h > @@ -771,7 +771,7 @@ AVFilter *avfilter_get_by_name(const char *name); > * @return If prev is non-NULL, next registered filter after prev or NULL if > * prev is the last filter. If prev is NULL, return the first registered > filter. > */ > -const AVFilter *avfilter_next(const AVFilter *prev); > +AVFilter *avfilter_next(const AVFilter *prev); > > #if FF_API_OLD_FILTER_REGISTER > /** > -- > 1.8.4
You can add const without breaking API, but you cannot remove it. Removing it is IMO wrong anyway. Why don't you fix avfilter_get_by_name instead? -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
