From 08ed062c4d90dc8a26bac939892f23188a1366a3 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 26 Oct 2016 11:01:57 +0200 Subject: Keyboard.c: move variable to inner scope --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 1529cd359..35a09958e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -697,10 +697,6 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) int free_model = 0, free_layout = 0; XkbDescPtr xkb = NULL; - #ifdef TEST - int ret; - #endif - switch (onoff) { case DEVICE_INIT: @@ -857,13 +853,15 @@ XkbError: (char *) values.auto_repeats, sizeof(values.auto_repeats)); #ifdef TEST - ret = + { + int ret = #endif - InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap, + InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap, nxagentBell, nxagentChangeKeyboardControl); #ifdef TEST - fprintf(stderr, "nxagentKeyboardProc: InitKeyboardDeviceStruct returns [%d].\n", ret); + fprintf(stderr, "nxagentKeyboardProc: InitKeyboardDeviceStruct returns [%d].\n", ret); + } #endif #ifdef XKB -- cgit v1.2.3