From: Thierry Reding <treding@xxxxxxxxxx> 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]); ^ Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> --- xf86drmMode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drmMode.c b/xf86drmMode.c index 43cdbbd1ede4..c669774f8fc5 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -901,7 +901,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx) i = 0; while (i < len) { - e = (struct drm_event *) &buffer[i]; + e = (struct drm_event *)(buffer + i); switch (e->type) { case DRM_EVENT_VBLANK: if (evctx->version < 1 || -- 2.11.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel