From 7d086184f8dd75b0977d69ed51d91e780e026738 Mon Sep 17 00:00:00 2001 From: Sean Ho Date: Mon, 11 Jan 2021 10:55:56 +0800 Subject: [PATCH] gtkwin: solved unused variable error solved unused variable error when KEY_EVENT_DIAGNOSTICS defined but DEBUG not defined although we intend to always define DEBUG when KEY_EVENT_DIAGNOSTICS is going to be defined. --- unix/gtkwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/gtkwin.c b/unix/gtkwin.c index be1e7bcd..a375cb30 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1218,7 +1218,7 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) if (digit < 0) inst->alt_keycode = -2; /* it's invalid */ else { -#ifdef KEY_EVENT_DIAGNOSTICS +#if defined(DEBUG) && defined(KEY_EVENT_DIAGNOSTICS) int old_keycode = inst->alt_keycode; #endif if (inst->alt_keycode == -1)