From 97ce5ea3f7c5e932ecf82943e23ca2b8b0dafa46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 20 Jan 2016 15:46:41 +0100 Subject: [PATCH] renderer: tinitial abs_s1 value is never read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found thanks to llvm scan-build. Signed-off-by: Marc-André Lureau --- src/vrend_renderer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index d61d9aa..bcb93f5 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -1571,7 +1571,6 @@ void vrend_set_viewport_states(struct vrend_context *ctx, GLsizei width, height; GLclampd near_val, far_val; bool viewport_is_negative = (state[0].scale[1] < 0) ? true : false; - GLfloat abs_s1 = fabsf(state->scale[1]); int i, idx; if (num_viewports > PIPE_MAX_VIEWPORTS || @@ -1581,9 +1580,9 @@ void vrend_set_viewport_states(struct vrend_context *ctx, } for (i = 0; i < num_viewports; i++) { - idx = start_slot + i; + GLfloat abs_s1 = fabsf(state[i].scale[1]); - abs_s1 = fabsf(state[i].scale[1]); + idx = start_slot + i; width = state[i].scale[0] * 2.0f; height = abs_s1 * 2.0f; x = state[i].translate[0] - state[i].scale[0];