xserver-multidpi/hw/dmx/examples
Peter Hutterer 3aca819940 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>
2011-12-19 22:27:17 -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 Replace XmuSnprintf with snprintf. 2011-09-19 15:16:04 -07:00
ev.c Convert a bunch of sprintf to snprintf calls 2011-11-23 12:15:06 -08: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-19 22:27:17 -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