title: Comparing to void pointers whose actual type is known
body: <p>I'm a bit lost on how to do the following:</p>
  
  <pre><code>void myMethod(void *ary, void *b, MPI_Datatype type) {
  
     if(ary[0] != b) { 
          /* do something */
     }
  </code></pre>
  
  <p>}</p>
  
  <p><code>b</code> is of type <code>type</code>, <code>ary</code> is an array of <code>type</code>. (The void pointers are used to enable the caller to pass elements of any kind of <code>MPI_Datatype</code>). How do I compare an element of <code>ary</code> with <code>b</code>? </p>
  
  <p>I tried a view things but am stuck with the following error (using `mpicc -ansi -std=c99 -Wall -g -c):</p>
  
  <pre><code>warning: dereferencing `void *` pointer [enabled by default]
  error: void value not ignored as it ought to be
  </code></pre>
  
  <p>EDIT: I fixed the typo in the function head: tpye -> type. I hope it didn't cause to much confusion</p>