[PATCH] ISO C90: Move declaration to the beginning of the function

Tomas Carnecky tom at dbservice.com
Tue Feb 3 12:18:53 PST 2009


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

Signed-off-by: Tomas Carnecky <tom at dbservice.com>
---
 dix/devices.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/devices.c b/dix/devices.c
index 6578229..4f85c6d 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1682,6 +1682,7 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist,
     int key = DO_ALL;
     BITS32 index2;
     int mask = vmask, i;
+    XkbEventCauseRec cause;
 
     ctrl = keybd->kbdfeed->ctrl;
     while (vmask) {
@@ -1765,7 +1766,6 @@ DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist,
 		return BadValue;
 	    }
 
-            XkbEventCauseRec cause;
             XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client);
             XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))),
  			     ctrl.leds, &cause);
-- 
1.6.1.2





More information about the xorg mailing list