title: Casting pointer to void
body: <p>Is there any difference in below two castings ?</p>
  
  <pre><code>int a=10;
  int *p=&amp;a;
  
  (void)p;          //does not give any warning or error 
  </code></pre>
  
  <p>or  </p>
  
  <pre><code>(void *)p;        //error: statement with no effect [-Werror=unused-value]
  </code></pre>
  
  <p>when complied with <code>gcc -Wall -Werror --std=c99 -pedantic</code> </p>
  
  <p><a href="https://stackoverflow.com/questions/33127075/traverse-pointer-from-last-node-to-first/33127236?noredirect=1#comment54067159_33127236">Just saw that in this answer.</a>  (clearly I misunderstood something )</p>