title: static const char * - defined but not used
body: <p>We need to define a <code>const static char</code> pointer in each and every header (.h) and source (.cpp) file to comply with company coding standards. </p>
  
  <pre><code>static const char * one_time_param = "ABCDEFG";
  </code></pre>
  
  <p>When compiled, the compiler is generating lot of "defined but not used" warnings. Does someone have a solution to this issue, please?</p>
  
  <pre><code>-Wno-unused-parameter
  </code></pre>
  
  <p>Using the above compiler flag, we can suppress these warnings. But, this also suppresses some other unused parameters which might need attention. We tried these solutions which only work for function parameters.</p>
  
  <pre><code>Q_UNUSED
  </code></pre>
  
  <p>in Qt, and</p>
  
  <pre><code>#define UNUSED(x) ((void)(x))
  </code></pre>
  
  <p>Previous question of similar kind:</p>
  
  <p><a href="https://stackoverflow.com/questions/386220/how-can-i-hide-defined-but-not-used-warnings-in-gcc">How can I hide &quot;defined but not used&quot; warnings in GCC?</a></p>