mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-25 03:40:10 +01:00
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>
This commit is contained in:
parent
4bfbe4c69e
commit
ecc2a09729
1 changed files with 1 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue