[FFmpeg-cvslog] swscale: fix "ISO C90 forbids mixed declarations and code" warning

Janne Grunau git at videolan.org
Sat Apr 16 04:02:14 CEST 2011


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Fri Apr 15 09:12:34 2011 +0200| [f668afd4896ee65683619b6f165dda4cdd46766f] | committer: Janne Grunau

swscale: fix "ISO C90 forbids mixed declarations and code" warning

only hit with --enable-runtime-cpudetect

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f668afd4896ee65683619b6f165dda4cdd46766f
---

 libswscale/swscale.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 277a0d3..9a4f89c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1198,24 +1198,22 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
     sws_init_swScale_c(c);
 
 #if CONFIG_RUNTIME_CPUDETECT
-    int flags = c->flags;
-
 #if ARCH_X86
     // ordered per speed fastest first
-    if (flags & SWS_CPU_CAPS_MMX2) {
+    if (c->flags & SWS_CPU_CAPS_MMX2) {
         sws_init_swScale_MMX2(c);
         return swScale_MMX2;
-    } else if (flags & SWS_CPU_CAPS_3DNOW) {
+    } else if (c->flags & SWS_CPU_CAPS_3DNOW) {
         sws_init_swScale_3DNow(c);
         return swScale_3DNow;
-    } else if (flags & SWS_CPU_CAPS_MMX) {
+    } else if (c->flags & SWS_CPU_CAPS_MMX) {
         sws_init_swScale_MMX(c);
         return swScale_MMX;
     }
 
 #else
 #if COMPILE_ALTIVEC
-    if (flags & SWS_CPU_CAPS_ALTIVEC) {
+    if (c->flags & SWS_CPU_CAPS_ALTIVEC) {
         sws_init_swScale_altivec(c);
         return swScale_altivec;
     }



More information about the ffmpeg-cvslog mailing list