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:
parent
0b38424cf2
commit
66db914adf
|
@ -31,7 +31,7 @@ void* runner(void* args)
|
||||||
int cc;
|
int cc;
|
||||||
for ( cc = 0; cc < 10; cc ++ )
|
for ( cc = 0; cc < 10; cc ++ )
|
||||||
{
|
{
|
||||||
printf("%d CC: %d\n", (int)args, cc);
|
printf("%p CC: %d\n", args, cc);
|
||||||
}
|
}
|
||||||
res ++;
|
res ++;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue