[PATCH libdrm 1/3] exynos: fix type-punned pointer build warning
Seung-Woo Kim
sw0312.kim at samsung.com
Fri Mar 31 03:30:55 UTC 2017
As like the commit ecc2a097294d ("xf86drm: Fix type-punned pointer
build warning"), this fixes following build warning.
exynos_drm.c: In function 'exynos_handle_event':
exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
e = (struct drm_event *) &buffer[i];
^
Signed-off-by: Seung-Woo Kim <sw0312.kim at samsung.com>
---
exynos/exynos_drm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index b961e52..f6204f1 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -417,7 +417,7 @@ exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx)
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 ||
--
1.7.4.1
More information about the dri-devel
mailing list