summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2022-02-21 20:40:27 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-22 13:26:53 +0000
commit0f07998f03f2b54f5f4902f26b6e08b994818b9d (patch)
tree7fd1458ae6618832b4ee801c8c63c60677ec1bab /cmake
parentd2ce78524cad911eb14fd58d051e78d6b9fb2103 (diff)
cmake: avoid unused parameters in cmake tests
unused parameters in cmake tests cause the tests to fail when the project is configured with `-Werror,-Wunused-parameter` Change-Id: If3065d008753a7718282dfc6ba0d79d46576cb34 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit d2ceb2e353304aeb91db4982afd8adeefdae3c3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake2
-rw-r--r--cmake/FindGLESv2.cmake2
-rw-r--r--cmake/FindWrapRt.cmake2
3 files changed, 3 insertions, 3 deletions
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
index 16dc1768ea..a3573bacd4 100644
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
@@ -123,7 +123,7 @@ list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}")
check_cxx_source_compiles("
#include <EGL/egl.h>
-int main(int argc, char *argv[]) {
+int main(int, char **) {
EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;
eglDestroyContext(dpy, ctx);
}" HAVE_EGL)
diff --git a/cmake/FindGLESv2.cmake b/cmake/FindGLESv2.cmake
index 8f3cbad5c1..25b9044bb2 100644
--- a/cmake/FindGLESv2.cmake
+++ b/cmake/FindGLESv2.cmake
@@ -26,7 +26,7 @@ else()
# include <GLES2/gl2.h>
#endif
-int main(int argc, char *argv[]) {
+int main(int, char **) {
glUniform1f(1, GLfloat(1.0));
glClear(GL_COLOR_BUFFER_BIT);
}" HAVE_GLESv2)
diff --git a/cmake/FindWrapRt.cmake b/cmake/FindWrapRt.cmake
index 779d18d1a0..95be415b50 100644
--- a/cmake/FindWrapRt.cmake
+++ b/cmake/FindWrapRt.cmake
@@ -21,7 +21,7 @@ check_cxx_source_compiles("
#include <unistd.h>
#include <time.h>
-int main(int argc, char *argv[]) {
+int main(int, char **) {
timespec ts; clock_gettime(CLOCK_REALTIME, &ts);
}" HAVE_GETTIME)