[FFmpeg-cvslog] r29008 - trunk/libswscale/swscale-example.c

diego subversion
Fri Mar 20 00:33:35 CET 2009


Author: diego
Date: Fri Mar 20 00:33:35 2009
New Revision: 29008

Log:
Initialize *srcContext, *dstContext, *outContext to NULL, avoids the warnings:
libswscale/swscale-example.c:60: warning: 'outContext' may be used uninitialized in this function
libswscale/swscale-example.c:60: warning: 'dstContext' may be used uninitialized in this function
libswscale/swscale-example.c:60: warning: 'srcContext' may be used uninitialized in this function

Modified:
   trunk/libswscale/swscale-example.c

Modified: trunk/libswscale/swscale-example.c
==============================================================================
--- trunk/libswscale/swscale-example.c	Fri Mar 20 00:29:19 2009	(r29007)
+++ trunk/libswscale/swscale-example.c	Fri Mar 20 00:33:35 2009	(r29008)
@@ -57,7 +57,8 @@ static int doTest(uint8_t *ref[3], int r
     int srcStride[3], dstStride[3];
     int i;
     uint64_t ssdY, ssdU, ssdV;
-    struct SwsContext *srcContext, *dstContext, *outContext;
+    struct SwsContext *srcContext = NULL, *dstContext = NULL,
+                      *outContext = NULL;
     int res;
 
     res = 0;
@@ -84,7 +85,6 @@ static int doTest(uint8_t *ref[3], int r
         }
     }
 
-    dstContext = outContext = NULL;
     srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL);
     if (!srcContext) {
         fprintf(stderr, "Failed to get %s ---> %s\n",




More information about the ffmpeg-cvslog mailing list