mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
FindThreads: fix printing a pointer value in test code
This causes a warning in C mode, and entirely fails in C++ mode:
CMake/Modules/CheckForPthreads.c: In function ‘runner’:
CMake/Modules/CheckForPthreads.c:34:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf("%d CC: %d\n", (int)args, cc);
^
Use %p to print out a pointer value, which will not cause any problems.
This commit is contained in:
committed by
Brad King
parent
0b38424cf2
commit
66db914adf
@@ -31,7 +31,7 @@ void* runner(void* args)
|
||||
int cc;
|
||||
for ( cc = 0; cc < 10; cc ++ )
|
||||
{
|
||||
printf("%d CC: %d\n", (int)args, cc);
|
||||
printf("%p CC: %d\n", args, cc);
|
||||
}
|
||||
res ++;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user