diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-07 15:30:30 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-07 20:58:00 +0200 |
commit | 44dcc4d6060c6dfffb60777396ee8ed8bd1fed76 (patch) | |
tree | 75c648e020db1ba92e027ce53d1f863e8f3b70ed /libavfilter/vf_blend.c | |
parent | 29c6f4329aee832405236b40726fa75b1d391e91 (diff) |
avfilter/blend_modes: Always preserve constness
These casts cast const away temporarily; they are safe, because
the pointers that are initialized point to const data. But this
is nevertheless not nice and leads to warnings when using
-Wcast-qual. blend_modes.c generates 546 (2*39*7) such warnings
which is the majority of such warnings for FFmpeg as a whole.
vf_blend.c and vf_blend_init.h also use this pattern;
they have also been changed.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_blend.c')
-rw-r--r-- | libavfilter/vf_blend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index dfe2b8b174..7100d9f372 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -133,8 +133,8 @@ static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize, ptrdiff_t width, ptrdiff_t height, \ FilterParams *param, double *values, int starty) \ { \ - const type *top = (type*)_top; \ - const type *bottom = (type*)_bottom; \ + const type *top = (const type*)_top; \ + const type *bottom = (const type*)_bottom; \ type *dst = (type*)_dst; \ AVExpr *e = param->e; \ int y, x; \ |