diff options
author | Niklas Haas <git@haasn.xyz> | 2017-06-19 22:46:04 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-06-24 22:51:48 +0200 |
commit | 7bfeb8bd26bcdbd4d31a38f1da273b86ef444552 (patch) | |
tree | ca930398aa850e9f0c0fe8990e7fe3b5005012e3 /video/out/opengl/video.c | |
parent | 628a2deb1d59af20abcdc4c62ad368db239cbb34 (diff) | |
download | mpv-7bfeb8bd26bcdbd4d31a38f1da273b86ef444552.tar.bz2 mpv-7bfeb8bd26bcdbd4d31a38f1da273b86ef444552.tar.xz |
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.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 6 |
1 files 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) { |