CC (V5.8) compiler warning: pthread_create()
Hi Friends,
Recently we are facing some peculiar "warning" from our code where we call pthread_create() function.
Warning:
=============
"testMain.cpp", line 153: Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(*)(void*).
=============
Usage:
==============
void *delayFunction( void *ptr )
{
...........
}
pthread_t thread1;
int secs;
pthread_create( &thread1, NULL, delayFunction, (void*) &secs);
==========
We note that, this warning comes when we compile with CC (V 5.8) in solaris 5.9 machine, but does not occure when we compile with g++ compiler.
We unable to get the cause of the above warning.
If anyone have any solution of this, please let me know.
Regards,
Nilanjan

