mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user