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.
This commit is contained in:
Pavel Otchertsov
2020-09-18 23:24:56 +03:00
parent ce89f54ee3
commit 6ef64013ba

View File

@@ -66,7 +66,7 @@ endif()
set(PTHREAD_C_CXX_TEST_SOURCE [====[
#include <pthread.h>
void* test_func(void* data)
static void* test_func(void* data)
{
return data;
}