From 182569bf6f4fdd8f5761d15fa0f184665ee787b5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 21 Mar 2016 09:48:11 +0100 Subject: hw/nxagent/Keyboard.c: The ret variable is only used later on when compiled with -DTEST. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warning: ``` Keyboard.c: In function ‘nxagentKeyboardProc’: Keyboard.c:688:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^ ``` --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 560ca64e4..8d1fbd4c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -685,7 +685,9 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) int free_model = 0, free_layout = 0; XkbDescPtr xkb = NULL; + #ifdef TEST int ret; + #endif switch (onoff) { @@ -842,7 +844,10 @@ XkbError: memmove((char *) defaultKeyboardControl.autoRepeats, (char *) values.auto_repeats, sizeof(values.auto_repeats)); - ret = InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap, + #ifdef TEST + ret = + #endif + InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); #ifdef TEST -- cgit v1.2.3