[FFmpeg-devel] [PATCH] Fix clang warning in libavfilter/vf_unsharp.c

Martin Storsjö martin
Sun Jun 27 21:02:31 CEST 2010


On Sun, 27 Jun 2010, M?ns Rullg?rd wrote:

> Eli Friedman <eli.friedman at gmail.com> writes:
> 
> > Patch attached; clang warns on " =- " because it looks like a typo for " -= ".
> >
> > -Eli
> >
> > Index: libavfilter/vf_unsharp.c
> > ===================================================================
> > --- libavfilter/vf_unsharp.c	(revision 23827)
> > +++ libavfilter/vf_unsharp.c	(working copy)
> > @@ -83,9 +83,9 @@
> >      for (y = 0; y < 2 * fp->steps_y; y++)
> >          memset(sc[y], 0, sizeof(sc[y][0]) * (width + 2 * fp->steps_x));
> >
> > -    for (y =- fp->steps_y; y < height + fp->steps_y; y++) {
> > +    for (y = -fp->steps_y; y < height + fp->steps_y; y++) {
> >          memset(sr, 0, sizeof(sr[0]) * (2 * fp->steps_x - 1));
> > -        for (x =- fp->steps_x; x < width + fp->steps_x; x++) {
> > +        for (x = -fp->steps_x; x < width + fp->steps_x; x++) {
> >              tmp1 = x <= 0 ? src[0] : x >= width ? src[width-1] : src[x];
> >              for (z = 0; z < fp->steps_x * 2; z += 2) {
> >                  tmp2 = sr[z + 0] + tmp1; sr[z + 0] = tmp1;
> 
> OK, no matter what anyone else might say.  Writing it like that is
> nothing short of crazy.

Applied

// Martin



More information about the ffmpeg-devel mailing list