int isn't large enough to store pointers on all platforms, use intptr_t instead. Signed-off-by: Stephen Kitt <steve@xxxxxxx> --- man3/malloc_info.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 index a5b8d34f9..3baa891fd 100644 --- a/man3/malloc_info.3 +++ b/man3/malloc_info.3 @@ -198,7 +198,7 @@ static int numThreads, numBlocks; static void * thread_func(void *arg) { - int tn = (int) arg; + intptr_t tn = (intptr_t) arg; /* The multiplier \(aq(2 + tn)\(aq ensures that each thread (including the main thread) allocates a different amount of memory. */ @@ -237,7 +237,7 @@ main(int argc, char *argv[]) /* Create threads that allocate different amounts of memory. */ - for (int tn = 0; tn < numThreads; tn++) { + for (intptr_t tn = 0; tn < numThreads; tn++) { errno = pthread_create(&thr[tn], NULL, thread_func, (void *) tn); if (errno != 0) -- 2.30.2