Fixed some compiler warnings
authorSam Lantinga <slouken@libsdl.org>
Tue, 21 Nov 2017 21:58:27 -0800
changeset 11712b94292eebb5c
parent 11711 8a982ed61896
child 11713 0083f778ede4
Fixed some compiler warnings
src/video/SDL_yuv.c
     1.1 --- a/src/video/SDL_yuv.c	Tue Nov 21 21:51:33 2017 -0800
     1.2 +++ b/src/video/SDL_yuv.c	Tue Nov 21 21:58:27 2017 -0800
     1.3 @@ -91,8 +91,8 @@
     1.4  static int GetYUVPlanes(int width, int height, Uint32 format, const void *yuv, int yuv_pitch,
     1.5  	                    const Uint8 **y, const Uint8 **u, const Uint8 **v, Uint32 *y_stride, Uint32 *uv_stride)
     1.6  {
     1.7 -    const Uint8 *planes[3];
     1.8 -    int pitches[3];
     1.9 +	const Uint8 *planes[3] = { NULL, NULL, NULL };
    1.10 +	int pitches[3] = { 0, 0, 0 };
    1.11  
    1.12      switch (format) {
    1.13      case SDL_PIXELFORMAT_YV12:
    1.14 @@ -395,12 +395,12 @@
    1.15           Uint32 src_format, const void *src, int src_pitch,
    1.16           Uint32 dst_format, void *dst, int dst_pitch)
    1.17  {
    1.18 -	const Uint8 *y;
    1.19 -    const Uint8 *u;
    1.20 -    const Uint8 *v;
    1.21 -    Uint32 y_stride;
    1.22 -    Uint32 uv_stride;
    1.23 -    YCbCrType yuv_type;
    1.24 +	const Uint8 *y = NULL;
    1.25 +    const Uint8 *u = NULL;
    1.26 +    const Uint8 *v = NULL;
    1.27 +    Uint32 y_stride = 0;
    1.28 +    Uint32 uv_stride = 0;
    1.29 +    YCbCrType yuv_type = YCBCR_601;
    1.30  
    1.31      if (GetYUVPlanes(width, height, src_format, src, src_pitch, &y, &u, &v, &y_stride, &uv_stride) < 0) {
    1.32          return -1;