Sean McGovern <[email protected]> writes: > On Friday, December 9, 2011, Måns Rullgård <[email protected]> wrote: >> Sean McGovern <[email protected]> writes: >> >>> Put the loop counter variable 'x' inside the for loop to avoid a >>> warning about mixing code and declarations. >>> --- >>> libavcodec/ptx.c | 3 +-- >>> 1 files changed, 1 insertions(+), 2 deletions(-) >>> >>> diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c >>> index eee0d58..d0363c4 100644 >>> --- a/libavcodec/ptx.c >>> +++ b/libavcodec/ptx.c >>> @@ -88,8 +88,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, > void *data, int *data_size, >>> if (buf_end - buf < w * bytes_per_pixel) >>> break; >>> #if HAVE_BIGENDIAN >>> - unsigned int x; >>> - for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel) >>> + for (unsigned int x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel) >>> AV_WN16(ptr+x, AV_RL16(buf+x)); >>> #else >> >> This is also not ISO C90 compatible. > > ...And so it isn't. Do we require our code to compile in C90, or should I > just elaborate on my commit message?
We use a lot of C99 features, but not this one. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
