ISO C90: Move declaration to the beginning of the function

devices.c: In function ‘DoChangeKeyboardControl’:
devices.c:1768: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Tomas Carnecky 2009-02-03 21:18:53 +01:00 committed by Peter Hutterer
parent 9fe9b6e4ef
commit 111fdef74d

View File

@ -1682,6 +1682,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist,
int key = DO_ALL; int key = DO_ALL;
BITS32 index2; BITS32 index2;
int mask = vmask, i; int mask = vmask, i;
XkbEventCauseRec cause;
ctrl = keybd->kbdfeed->ctrl; ctrl = keybd->kbdfeed->ctrl;
while (vmask) { while (vmask) {
@ -1765,7 +1766,6 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist,
return BadValue; return BadValue;
} }
XkbEventCauseRec cause;
XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client);
XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))),
ctrl.leds, &cause); ctrl.leds, &cause);