On 09/12/11 17:50, Sean McGovern wrote:
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?

http://libav.org/developer.html#C-language-features

Should state exactly which features we support.

lu

--

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to