KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to use pthreat but I dont need to pass any argument to the function. Therefore, I pass NULL to the function on pthread_create. I have 7 pthreads, so gcc compiler warns me that I have 7 unsued parameters. How can I define these 7 parameters as unused in C programming? If I do not define these parameters as unused, would it cause any problem? Thank you in advance for the responses. 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; }
Tags (comma-separated)
Save Edits
Cancel