title: Removing C6054 error with scanf functions
body: <p>I am using Code Analysis (aka FxCop) on VS2012 and I have a few functions of the form</p>
  
  <pre><code>void ReadTable(FILE *fd)
  {
      char label[32];
      /* ... */
      fscanf(fd, "%s", label);
      /* ... */
      if (strcmp(label, "TEST") == 0)
      {
          /* ... */
      }
  }
  </code></pre>
  
  <p>These always throw <code>warning C6054: String 'label' might not be zero-terminated.</code> I understand why this happens, since they can't use SAL annotations to indicate the output from <code>fscanf</code> will be null-terminated, but the fact remains.</p>
  
  <p>Is there a way to get rid of this warning (without disabling the relevant Code Analysis check wholesale)? Or is it something I just have to live with when using <code>scanf</code>?</p>