I\'m learning Pthreads. My code executes the way I want it to, I\'m able to use it. But it gives me a warning on compilation.
I compile using:
gcc
A quick hacky fix might just to cast to long instead of int. On a lot of systems, sizeof(long) == sizeof(void *).
long
int
sizeof(long) == sizeof(void *)
A better idea might be to use intptr_t.
intptr_t
int threadnumber = (intptr_t) param;
and
pthread_create(&(tid[i]), &attr, runner, (void *)(intptr_t)i);