title: incompatible pointer types passing 'void (void *) to parameter of type 'void *
body: <p>I have created pthread as follows:</p>
  
  <pre><code>void function1(void *s) {
  start = (*(int *)s ;
  }
  
  pthread_t threads[numthreads];
  int ids[numthreads];
  for (i = 0; i &lt; numthreads; i++) {
      ids[i] = i;
      int * p = &amp;ids[i] ;
      pthread_create(&amp;threads[i], NULL, function1, (void *)p);
  }
  
  </code></pre>
  
  <p>But this is giving me error:</p>
  
  <pre><code>&gt;&gt; mpicc -o hprogram hprogram.c
  warning: incompatible pointer types passing 'void (void *)' to
        parameter of type 'void * _Nullable (* _Nonnull)(void * _Nullable)'
        [-Wincompatible-pointer-types]
                          pthread_create(&amp;threads[i], NULL, function1, (void *)...
                                                            ^~~~~~~~~~
  /usr/include/pthread.h:328:31: note: passing argument to parameter here
                  void * _Nullable (* _Nonnull)(void * _Nullable),
                                              ^
  1 warning generated.
  
  
  </code></pre>
  
  <p>This is an mpi program and im creating a hybrid mpi using pthreads.</p>