aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding2015-04-13 04:36:59 -0500
committerThierry Reding2017-01-18 01:34:53 -0600
commitecc2a097294dcc773dbe5e2a989f180bedb89b69 (patch)
treeb9f2b18c0f696171689a1ef664823d0ca407feb3
parent4bfbe4c69e95ae3aaaa151f3ffcdd1d3e112214b (diff)
downloadexternal-libgbm-ecc2a097294dcc773dbe5e2a989f180bedb89b69.tar.gz
external-libgbm-ecc2a097294dcc773dbe5e2a989f180bedb89b69.tar.xz
external-libgbm-ecc2a097294dcc773dbe5e2a989f180bedb89b69.zip
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>
-rw-r--r--xf86drmMode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c
index fb22f683..0266bc10 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -901,7 +901,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
901 901
902 i = 0; 902 i = 0;
903 while (i < len) { 903 while (i < len) {
904 e = (struct drm_event *) &buffer[i]; 904 e = (struct drm_event *)(buffer + i);
905 switch (e->type) { 905 switch (e->type) {
906 case DRM_EVENT_VBLANK: 906 case DRM_EVENT_VBLANK:
907 if (evctx->version < 1 || 907 if (evctx->version < 1 ||