diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2015-09-22 04:46:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-25 14:08:06 (GMT) |
commit | 66db914adfd8cbb846fcf82e290fe006a800a36d (patch) | |
tree | 456a42400ba94edecbcd427bd73553a9414ea703 /Modules/CheckForPthreads.c | |
parent | 0b38424cf26fea866c54b75347de0c5c8a8d15d3 (diff) | |
download | CMake-66db914adfd8cbb846fcf82e290fe006a800a36d.zip CMake-66db914adfd8cbb846fcf82e290fe006a800a36d.tar.gz CMake-66db914adfd8cbb846fcf82e290fe006a800a36d.tar.bz2 |
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.
Diffstat (limited to 'Modules/CheckForPthreads.c')
-rw-r--r-- | Modules/CheckForPthreads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c index 7250fbf..2732957 100644 --- a/Modules/CheckForPthreads.c +++ b/Modules/CheckForPthreads.c @@ -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; |