xf86drm: Fix type-punned pointer build warning
CC libdrm_la-xf86drmMode.lo ../xf86drmMode.c: In function 'drmHandleEvent': ../xf86drmMode.c:854:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e = (struct drm_event *)(&buffer[i]); ^ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99350 Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Thierry Reding <treding@nvidia.com>main
parent
4bfbe4c69e
commit
ecc2a09729
|
@ -901,7 +901,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < len) {
|
while (i < len) {
|
||||||
e = (struct drm_event *) &buffer[i];
|
e = (struct drm_event *)(buffer + i);
|
||||||
switch (e->type) {
|
switch (e->type) {
|
||||||
case DRM_EVENT_VBLANK:
|
case DRM_EVENT_VBLANK:
|
||||||
if (evctx->version < 1 ||
|
if (evctx->version < 1 ||
|
||||||
|
|
Loading…
Reference in New Issue