title: How to suppress single MISRA 2004 Rule for symbol in PC lint
body: <p>I'm linting below code snippet at <a href="http://gimpel-online.com//cgi-bin/genPage.py?srcFile=diy.c&amp;cgiScript=analyseCode.py&amp;title=Do-It-Yourself+Example+%28C%29&amp;intro=This+example+allows+you+to+specify+your+own+C+code.&amp;compilerOption=online32.lnt&amp;includeOption=%7B%7BquotedIncludeOption%7D%7D" rel="nofollow noreferrer">online demonstration website of PC-Lint</a> with enabled MISRA 2004 checkings</p>
  <pre><code>    #include &lt;stdint.h&gt;
  
      //enable some of MISRA 2004 Rules
      //lint +e960
      
      static uint8_t printf_(uint8_t a, void * b, ...);
      static uint8_t printf_(uint8_t a, void * b, ...)
      {
        (void) a;
        (void) b;
        return 0U;
      }
      
      static const uint8_t (*func)(uint8_t a, void * b, ...) = printf_;
      
      int main(void)
      {
        uint8_t data[8U] = {0};
        (void) func(1U, &amp;data[0], 2U);
        return 0;
      }
  </code></pre>
  <p>PC Lint then tells me that I have following violations of MISRA 2004 Rules:</p>
  <blockquote>
  <p>Note 960:  Violates MISRA 2004 Required Rule 16.1, function has variable number of arguments: <code>printf_</code></p>
  <p>Note 960:  Violates MISRA 2004 Required Rule 16.9, function identifier used without '&amp;' or parenthesized parameter list: <code>printf_</code></p>
  </blockquote>
  <p>How to suppress only MISRA 2004 Rule 16.1 for function <code>printf_</code>?<br />
  Until now I've tried following solutions, none of below work for me:</p>
  <ul>
  <li><code>-esym(960, 16.1)</code> suppresses MISRA Rule 16.1 for all other symbols</li>
  <li><code>-estring(960, &quot;printf_&quot;)</code> suppresses all other MISRA Rules for <code>printf_</code> symbol e.g. Rule 16.9</li>
  <li><code>-estring(960, &quot;function has variable number of arguments: 'printf_'&quot;)</code> according to manual suppose to work, but I cannot make it happen</li>
  <li><code>-estring(960, &quot;function has variable number of arguments:&quot;, &quot;printf_&quot;)</code> some experimental hint from following website <a href="https://matthiaskraaz.blogspot.com/2015/12/pc-lint-using-estring-to-suppress-misra.html" rel="nofollow noreferrer">Matthias Kraaz' blog</a> also doesn't work</li>
  </ul>
  <p>The best which I got for now is:</p>
  <ul>
  <li>putting <code>printf_</code> in block of <code>-esym(960, 16.1) ... +esym(960, 16.1)</code>, this however elevates MISRA 2004 warnings to the error level and stops compilation if another violation is going to happen.</li>
  </ul>
  <p>I'm looking forward for your ideas.</p>