title: How do I suppress PC-Lint errors for C99-style initialization of structure members?
body: <p>I am using PC-Lint 8.00x with the following options:</p>
  
  <p><code>+v -wlib(1) +fan +fas</code></p>
  
  <p>I receive a number of error messages from PC-Lint when I run code similar to the following:</p>
  
  <pre><code>typedef union
  {
      struct
      {
          unsigned int a : 4;
          unsigned int b : 4;
          unsigned int c : 4;
          unsigned int d : 4;
      } bits;
      unsigned short value;
  } My_Value;
  
  int main (void)
  {
      My_Value test[] =
      {
          {
              .bits.a = 2,
              .bits.b = 3,    //Errors 133 and 10
              .bits.c = 2,
              .bits.d = 3,
          },
          {
              .bits.a = 1,
              .bits.b = 1,    //Errors 133 and 10
              .bits.c = 1,
              .bits.d = 0,
          },
      };
  
      /* Do something meaningful. */
  
      return 0;
  }
  </code></pre>
  
  <p>The reported errors are defined by PC-Lint as follows:</p>
  
  <blockquote>
    <blockquote>
      <p>Error 133: Too many initializers for aggregate 'unknown-name'</p>
      
      <p>Error 10: Expecting '}'</p>
    </blockquote>
  </blockquote>
  
  <p>I have tried searching Gimpel and have done some Google searches, but I cannot find anything useful.  The code functions as intended and everything initializes properly.  Here are my questions.</p>
  
  <p><strong>1. Does PC-Lint 8.00x support C99 style initialization of structure members?</strong></p>
  
  <p><strong>2. If so, what options/flags do I have to set for PC-Lint to suppress these messages globally?</strong></p>
  
  <p><strong>EDIT</strong><br>
  I should have been more detailed in regards to question 2.  I would like to globally suppress these messages in regards to my usage of designated initializers as shown above.  I cannot suppress them globally for all situations as these errors can detect true errors in the code.</p>