diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-29 13:45:32 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-30 08:43:14 +1000 |
commit | 5085ac09a50721d87196bd9f2607dc76200ca399 (patch) | |
tree | 78b4efdde92b4e7f317bdbfb1b7efec53ef65efe /dix | |
parent | 1ae8332d643299a3ee9a9f45a8e25b8c87c751e1 (diff) |
input: switch internal event types to enums.
Use enum EventType instead of ints. This requires a load of default
cases in various switch statements to silence compiler warnings.
Reported-by: Aaron Plattner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/eventconvert.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dix/eventconvert.c b/dix/eventconvert.c index 943178e99..866fa2926 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -147,6 +147,8 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) *count = 0; *xi = NULL; return BadMatch; + default: + break; } ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->any.type); @@ -196,7 +198,8 @@ EventToXI2(InternalEvent *ev, xEvent **xi) case ET_RawButtonRelease: case ET_RawMotion: return eventToRawEvent((RawDeviceEvent*)ev, xi); - + default: + break; } ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->any.type); @@ -247,6 +250,8 @@ eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count) case ET_KeyRelease: kbp->type = DeviceKeyRelease; break; case ET_ProximityIn: kbp->type = ProximityIn; break; case ET_ProximityOut: kbp->type = ProximityOut; break; + default: + break; } if (num_events > 1) @@ -518,6 +523,8 @@ GetCoreType(InternalEvent *event) case ET_ButtonRelease: coretype = ButtonRelease; break; case ET_KeyPress: coretype = KeyPress; break; case ET_KeyRelease: coretype = KeyRelease; break; + default: + break; } return coretype; } @@ -539,6 +546,8 @@ GetXIType(InternalEvent *event) case ET_KeyRelease: xitype = DeviceKeyRelease; break; case ET_ProximityIn: xitype = ProximityIn; break; case ET_ProximityOut: xitype = ProximityOut; break; + default: + break; } return xitype; } |