From 6ef64013baf8e43d025dc2a129b538bf875721f9 Mon Sep 17 00:00:00 2001 From: Pavel Otchertsov Date: Fri, 18 Sep 2020 23:24:56 +0300 Subject: FindThreads: Add missing static keyword in pthread test code When CMAKE_C_FLAGS contains '-Werror -Wmissing-prototypes' the pthread test code check fails with error: "src.c:3:7: error: no previous prototype for 'test_func' [-Werror=missing-prototypes]". Adding 'static' keyword to 'test_func' fixes it. --- Modules/FindThreads.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index ee49867..e3e6591 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -66,7 +66,7 @@ endif() set(PTHREAD_C_CXX_TEST_SOURCE [====[ #include -void* test_func(void* data) +static void* test_func(void* data) { return data; } -- cgit v0.12