summaryrefslogtreecommitdiff
path: root/include/misc.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-16 09:15:25 -0500
committerKeith Packard <keithp@keithp.com>2011-12-19 22:27:17 -0800
commit3aca8199405cff5097ee5813605ec78b5ae44a43 (patch)
treeb44e908bdea2226f03ac051d539990def499d714 /include/misc.h
parentc065f7b16329e30cb976359e0a807c2adaf50123 (diff)
dmx: force -fno-strict-aliasing for xinput example
Compiler warning: xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing rules The code itself is the usual XInput client-side code: XEvent event; XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event; XNextEvent(display, &event); printf("%d\n", e->type); Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients must use pointer aliasing as above when using the XNextEvent API. Disable strict aliasing for this example. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'include/misc.h')
0 files changed, 0 insertions, 0 deletions