Subject: [PATCH] src/xterm.c: use 'thickness' only in a case of !USE_CAIRO
From: Alexander Kuleshov <[email-masked]>
To: [email-masked]
Date: Tue, 5 Dec 2017 00:11:47 +0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

I've attached simple patch with moving of the `thickness` var
(from the x_draw_underwave() src/xterm.c) a little bit below, to get rid of:

xterm.c:3520:61: error: unused variable 'thickness' [-Werror,-Wunused-variable]
  int wave_height = 3 * scale_y, wave_length = 2 * scale_x, thickness = scale_y;

as this variable is used only in a case of !USE_CAIRO

Thank you.
From d11a651a5d4b61a18794fd29b6fab6722a885c06 Mon Sep 17 00:00:00 2001
From: Alexander Kuleshov <[email-masked]>
Date: Mon, 4 Dec 2017 23:58:00 +0600
Subject: [PATCH] Move thickness assignment where it is used

* src/xterm.c (x_draw_underwave): assign a value to 'thickness'
variable only in a case of !USE_CAIRO
---
 src/xterm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xterm.c b/src/xterm.c
index 1b45cf1b0b..b8ae64c6df 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3517,7 +3517,7 @@ x_draw_underwave (struct glyph_string *s)
 
   x_get_scale_factor (s->display, &scale_x, &scale_y);
 
-  int wave_height = 3 * scale_y, wave_length = 2 * scale_x, thickness = scale_y;
+  int wave_height = 3 * scale_y, wave_length = 2 * scale_x;
 
 #ifdef USE_CAIRO
   x_draw_horizontal_wave (s->f, s->gc, s->x, s->ybase - wave_height + 3,
@@ -3527,6 +3527,7 @@ x_draw_underwave (struct glyph_string *s)
   bool odd;
   XRectangle wave_clip, string_clip, final_clip;
 
+  thickness = scale_y;
   dx = wave_length;
   dy = wave_height - 1;
   x0 = s->x;
-- 
2.14.3