xserver/hw
Peter Hutterer 9e0f777b7b 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)
2012-01-18 11:28:39 -08:00
..
dmx dmx: force -fno-strict-aliasing for xinput example 2012-01-18 11:28:39 -08:00
kdrive kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast 2012-01-18 11:28:04 -08:00
vfb Limit the number of screens Xvfb will attempt to allocate memory for 2012-01-18 11:17:02 -08:00
xfree86 xaa: avoid possible freed pointer reuse in epilogue 2012-01-18 11:26:36 -08:00
xnest Xnest: Match the host's keymap 2011-10-26 00:49:28 -07:00
xquartz XQuartz: appledri: Correct byte swapping in event notifications 2011-10-29 00:08:49 -07:00
xwin XWin: windowswm: Correct byte swapping in event notifications 2011-10-29 00:08:55 -07:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00