title: Use of (void) before a function call
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/689677/casting-unused-return-values-to-void">casting unused return values to void</a>  </p>
  </blockquote>
  
  
  
  <p>What is the purpose of <code>(void)</code> before a function call, for example</p>
  
  <pre><code>(void)func1();
  </code></pre>
  
  <p>I assume this is the same as simply calling <code>func1();</code> </p>
  
  <p>Therefore is the <code>(void)</code> call simply to let other programmers know that the return type will be ignored, for instance if <code>func1()</code> had a return type of <code>int</code>, or does the compiler perhaps perform some optimizations on the function? Perhaps there is another reason behind it altogether - is it even legal C++ or perhaps is it a remnant of C seen in some legacy code. </p>
  
  <p>Thanks</p>