xserver/hw/dmx/examples
Peter Hutterer 625d108819 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>
(cherry picked from commit 3aca819940)
2011-12-21 12:21:58 -08:00
..
.gitignore Rename xdmx client to dmxinfo 2010-03-22 00:45:46 -05:00
dmxaddinput.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxaddscreen.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxinfo.c Rename xdmx client to dmxinfo 2010-03-22 00:45:46 -05:00
dmxreconfig.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxresize.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxrminput.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxrmscreen.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
dmxwininfo.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
ev.c Use strerror instead of errno values in user strings. 2008-02-14 07:52:02 +11:00
evi.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
Makefile.am dmx: force -fno-strict-aliasing for xinput example 2011-12-21 12:21:58 -08:00
res.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
xbell.c dmx/examples: Fix missing key_click_percent assignment. 2011-06-16 00:44:43 +02:00
xinput.c dmx: fix OsAbort()-related build error in examples/xinput.c 2010-03-03 19:59:18 -08:00
xled.c Programs in hw/dmx/examples/ want client-side xkb headers. 2008-03-07 23:26:56 +01:00
xtest.c Death to RCS tags. 2007-06-29 14:06:52 -04:00