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:
Rolf Eike Beer 2015-09-22 06:46:28 +02:00 committed by Brad King
parent 0b38424cf2
commit 66db914adf
1 changed files with 1 additions and 1 deletions

View File

@ -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;