title: Passing array of type char** as an argument of type void** gives unexpectable warning
body: <p>I have a warning when passing a pointer array (char**) as an argument of type void** in a function.</p>
  
  <p>Below is my code. I use gcc compiler, it gives me this warning:</p>
  
  <blockquote>
    <p>"warning: passing argument 1 of 'print' from incompatible pointer type [enabled by default]".</p>
  </blockquote>
  
  <p>It points to this line <code>print(lineptr, 2);</code></p>
  
  <p>And another warning says:</p>
  
  <blockquote>
    <p>warning: format '%s' expects argument of type 'char *', but argument 2 has type 'void *'.</p>
  </blockquote>
  
  <p>And it points to this line <code>printf("%s\n", *v++);</code></p>
  
  <p>I tried replacing all <code>void**</code> with <code>char**</code> and it works well.</p>
  
  <p>The reason that I want to use <code>void**</code> is that I'm writing a quicksort function that can receive both character or integer arrays.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  char *lineptr[100] = {"mister", "x"};
  void print(void **, int n);
  int main()
  {
      print(lineptr, 2);
      return 0;
  }
  void print(void **v, int n)
  {
      while( n-- &gt; 0 )
          printf("%s\n", *v++);
  }
  </code></pre>
  
  <p><strong>The question is: does this warnings affect anything?</strong></p>
  
  <p>Now, I'm having no problems running the code and getting a desired output, but I asks if this method is guaranteed to work well every time.</p>
  
  <p>Thank you in advance!</p>