diff options
author | Orestis Floros <orestisf1993@gmail.com> | 2018-03-30 23:43:16 +0300 |
---|---|---|
committer | Orestis Floros <orestisf1993@gmail.com> | 2018-03-31 01:05:33 +0300 |
commit | c9ed6fed59bb297d1393fdca790ae433bc6f09f9 (patch) | |
tree | 77ef86de91d8f939cc7f7b032ab2e65c62d4cdef | |
parent | 212d957c69b15e57a791eec52de34dcde4241e86 (diff) |
Fix build error with -O2
../render/gles2/renderer.c: In function ‘gles2_render_texture_with_matrix’:
../render/gles2/renderer.c:140:2: error: ‘target’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
glBindTexture(target, tex_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../render/gles2/renderer.c:145:2: error: ‘prog’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
glUseProgram(prog);
-rw-r--r-- | render/gles2/renderer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index f96f468b..8f3ce7f7 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -111,8 +111,8 @@ static bool gles2_render_texture_with_matrix(struct wlr_renderer *wlr_renderer, struct wlr_gles2_texture *texture = gles2_get_texture_in_context(wlr_texture); - GLuint prog; - GLenum target; + GLuint prog = 0; + GLenum target = 0; switch (texture->type) { case WLR_GLES2_TEXTURE_GLTEX: case WLR_GLES2_TEXTURE_WL_DRM_GL: |