title: warning: '0' flag ignored with precision and ‘%i’ gnu_printf format
body: <p>I am getting the following warning when compiling some legacy C code on Ubuntu Karmic, using gcc 4.4.1</p>
  
  <p>The warning is:</p>
  
  <blockquote>
    <p>src/filename.c:385: warning: '0' flag
    ignored with precision and ‘%i’
    gnu_printf format</p>
  </blockquote>
  
  <p>The snippet which causes the warning to be emitted is:</p>
  
  <pre><code> char     buffer[256] ;
   long     fnum ;
   /* some initialization code here ... */
   sprintf(buffer, "F%03.3i.DTA", (int)fnum);  /* &lt;- warning emitted here */
  </code></pre>
  
  <p>I think I understand the warning, but I would like to check in here to see if I am right, and also the (definite) correct way of resolving this.</p>