xserver/hw
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
..
dmx dmx: force -fno-strict-aliasing for xinput example 2011-12-21 12:21:58 -08:00
kdrive kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast 2011-12-20 01:13:26 -08:00
vfb Limit the number of screens Xvfb will attempt to allocate memory for 2011-12-09 12:32:43 -08:00
xfree86 xaa: avoid possible freed pointer reuse in epilogue 2011-12-09 12:35:27 -08:00
xnest Xnest: Match the host's keymap 2011-10-24 18:16:46 -07:00
xquartz XQuartz: appledri: Correct byte swapping in event notifications 2011-10-28 18:31:10 -07:00
xwin XWin: windowswm: Correct byte swapping in event notifications 2011-10-28 18:31:15 -07:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00