diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-19 23:33:35 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-19 23:33:35 +0000 |
commit | e7c09a0f2bb77ccc781115e0a60bfe33821a5ac0 (patch) | |
tree | 9f720fcdd020aef58b9349847cd24ef0eea4626a /libswscale | |
parent | 6130d5c9b1bce3ba0074e97a8776b3ad6e7a908f (diff) |
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
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29008 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale-example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 993d8db900..27f6e202fd 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -57,7 +57,8 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat 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 refStride[3], int w, int h, int srcFormat } } - 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", |