From f577a01f5e8d9678d268917ca727a6e9a3e819a6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 27 Oct 2016 12:29:26 +0200 Subject: eglfs: Cast to EGLNativeDisplayType in EGLDevice backend When compiling with EGL native types being the Xlib types (uncommon since we disable this both for Mesa and NVIDIA embedded, but can happen with other vendor's headers), the types for EGLDeviceEXT (void*) and EGLNativeDisplayType (Display, i.e. _XDisplay*) won't match, breaking compilation. At runtime we won't hit that path, so all we need to ensure is that the code compiles. Do this via a cast. When the native types are generic, both types are void* so the cast has no effect. Change-Id: Ib54f569d4494906f74107f08b47bd6b521d700db Reviewed-by: Louai Al-Khanji --- .../eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp index 743f714cf0..f6e86bf0bc 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp @@ -71,7 +71,7 @@ void QEglFSKmsEglDevice::close() EGLNativeDisplayType QEglFSKmsEglDevice::nativeDisplay() const { - return static_cast(m_integration)->eglDevice(); + return reinterpret_cast(static_cast(m_integration)->eglDevice()); } QEglFSKmsScreen *QEglFSKmsEglDevice::createScreen(QEglFSKmsIntegration *integration, QEglFSKmsDevice *device, QEglFSKmsOutput output, QPoint position) -- cgit v1.2.3