diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-05-14 16:23:59 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-24 14:08:13 +1000 |
commit | 4c4df3ac0d8162c874b85fede12ffbe42f0062c3 (patch) | |
tree | 94507c24cc92a525de011e08f6f4df6a51b0366a | |
parent | ba7d1020ac0135ebc8acda4cd57ed48b331e0133 (diff) |
input: Don't implicitly define verify_internal_event
Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22
mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
verify_internal_event(e);
^
1 error generated.
Also includes some other warning cleanups in events.c we're there.
events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue]
else if ((type == MotionNotify))
~~~~~^~~~~~~~~~~~~~~
events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue]
else if ((type == MotionNotify))
~ ^ ~
events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue]
else if ((type == MotionNotify))
^~
=
events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue]
verify_internal_event(event);
^
events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
DeviceIntPtr it = inputInfo.devices;
^
events.c:5893:18: note: previous declaration is here
DeviceIntPtr it = inputInfo.devices;
^
3 warnings and 1 error generated.
events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type
'const InternalEvent *' (aka 'const union _InternalEvent *')
verify_internal_event(ev);
^~
../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here
extern void verify_internal_event(const InternalEvent *ev);
^
1 warning generated.
Found-by: yuffie tinderbox (-Werror=implicit)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | dix/events.c | 7 | ||||
-rw-r--r-- | mi/mieq.c | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/dix/events.c b/dix/events.c index 14f6f909e..b60c29952 100644 --- a/dix/events.c +++ b/dix/events.c @@ -112,6 +112,7 @@ Equipment Corporation. #include <X11/Xproto.h> #include "windowstr.h" #include "inputstr.h" +#include "inpututils.h" #include "scrnintstr.h" #include "cursorstr.h" @@ -2195,7 +2196,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent */ if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask)) /* grab activated */; - else if ((type == MotionNotify)) + else if (type == MotionNotify) pDev->valuator->motionHintWindow = pWin; else if (type == DeviceMotionNotify || type == DeviceButtonPress) CheckDeviceGrabAndHintWindow (pWin, type, @@ -2832,7 +2833,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) WindowPtr prevSpriteWin, newSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; - verify_internal_event(ev); + verify_internal_event((InternalEvent *)ev); prevSpriteWin = pSprite->win; @@ -5906,7 +5907,7 @@ PickPointer(ClientPtr client) if (!client->clientPtr) { - DeviceIntPtr it = inputInfo.devices; + it = inputInfo.devices; while (it) { if (IsMaster(it) && it->spriteInfo->spriteOwner) @@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group. # include "windowstr.h" # include "pixmapstr.h" # include "inputstr.h" +# include "inpututils.h" # include "mi.h" # include "mipointer.h" # include "scrnintstr.h" |