From be8f2e43116a2edfae709e2c99009c3bad26f872 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Mon, 12 Jun 2023 10:37:01 +0200 Subject: [PATCH] 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. Fixes: QTBUG-114431 Change-Id: Iaac49589144dbe4172ec58c6705a9f899c25f01f Reviewed-by: Alexey Edelev (cherry picked from commit 14b01b0aadfac07e2a87cea4af0b09b874ffa100) Reviewed-by: Qt Cherry-pick Bot --- cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake index 0733f1f702c..9ac8e2fa0cf 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 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)