title: How do I best silence a warning about unused variables?
body: <p>I have a cross platform application and in a few of my functions not all the values passed to functions are utilised.  Hence I get a warning from GCC telling me that there are unused variables.</p>
  
  <p>What would be the best way of coding around the warning?</p>
  
  <p>An #ifdef around the function? </p>
  
  <pre><code>#ifdef _MSC_VER
  void ProcessOps::sendToExternalApp(QString sAppName, QString sImagePath, qreal qrLeft, qreal qrTop, qreal qrWidth, qreal qrHeight)
  #else
  void ProcessOps::sendToExternalApp(QString sAppName, QString sImagePath, qreal /*qrLeft*/, qreal /*qrTop*/, qreal /*qrWidth*/, qreal /*qrHeight*/)
  #endif
  {
  </code></pre>
  
  <p>This is so ugly but seems like the way the compiler would prefer.</p>
  
  <p>Or do I assign zero to the variable at the end of the function? (which I hate because it's altering something in the program flow to silence a compiler warning).</p>
  
  <p>Is there a correct way?</p>