I need to use pthreat, but I do not need to pass any argument to the function. Therefore, I pass NULL functions to pthread_create. I have 7 pthreads, so the gcc compiler warns me that I have 7 unauthorized parameters. How can I define these 7 parameters as unused in C programming? If I do not define these parameters as unused, will it cause any problems? Thank you in advance for your answers.
void *timer1_function(void * parameter1){ //<statement> } int main(int argc,char *argv[]){ int thread_check1; pthread_t timer1; thread_check1 = pthread_create( &timer1, NULL, timer1_function, NULL); if(thread_check1 !=0){ perror("thread creation failed"); exit(EXIT_FAILURE); } while(1){} return 0; }
johan
source share