From 7bfeb8bd26bcdbd4d31a38f1da273b86ef444552 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 19 Jun 2017 22:46:04 +0200 Subject: vo_opengl: silence -Wmaybe-uninitialized false positive These can never be uninitialized because the enum cases are exhaustive and the fallback is in the correct order, but GCC is too dumb to understand this. Also explicitly initialize tex_type, because while GCC doesn't warn about it (for some reason), maybe it will in the future. --- video/out/opengl/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 541e58a534..7ee09e572e 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2138,11 +2138,11 @@ static void pass_dither(struct gl_video *p) if (!p->dither_texture) { MP_VERBOSE(p, "Dither to %d.\n", dst_depth); - int tex_size; - void *tex_data; + int tex_size = 0; + void *tex_data = NULL; GLint tex_iformat = 0; GLint tex_format = 0; - GLenum tex_type; + GLenum tex_type = 0; unsigned char temp[256]; if (p->opts.dither_algo == DITHER_FRUIT) { -- cgit v1.2.3