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
         memcpy(ptr, buf, w*bytes_per_pixel);
-- 
1.7.6

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

Reply via email to