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 <alexey.edelev@qt.io> (cherry picked from commit 14b01b0aadfac07e2a87cea4af0b09b874ffa100) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>