summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-06-12 10:37:01 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-06-12 21:55:36 +0000
commit14b01b0aadfac07e2a87cea4af0b09b874ffa100 (patch)
treefcbd97add9a5d2b48c48693e9fa9a12e9ab41518
parent1a619ccb246a647e3c689d0924fe105078658033 (diff)
Silence a warning in EGL check
There is a chance that an unused variable warning will be treated as an error, and in that case, this check will fail, and as a result FindEGL will fail. Pick-to: 6.2 6.5 6.6 Fixes: QTBUG-114431 Change-Id: Iaac49589144dbe4172ec58c6705a9f899c25f01f Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
index 0733f1f702..9ac8e2fa0c 100644
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
@@ -128,7 +128,8 @@ check_cxx_source_compiles("
#include <EGL/egl.h>
int main(int, char **) {
- EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;
+ [[maybe_unused]] EGLint x = 0;
+ EGLDisplay dpy = 0; EGLContext ctx = 0;
eglDestroyContext(dpy, ctx);
}" HAVE_EGL)