warning in pthread creation
void * func1( void); // prototype
void * func1( void)
{
..
...
}
int main()
{
int ret;
pthread_t test1;
ret = pthread_create(&test1,NULL,&func1,NULL);
if(ret == 0)
{
printf("\n success in creating a thread \n");
}
pthread_exit(NULL);
return 0;
}
after compiling the above code i am gettin following warning,
thread_1.c:805: warning: passing arg 3 of `pthread_create' from incompatible pointer type
kindly resolve the same
thanks in advance
Nathan
|