title: GCC: why a -Wformat warning for this fprintf?
body: <p>We cleaned up a large number of warnings. In several cases, we replaced %s with %d. Everything seemed OK until we realized that the generated code wouldn't compile - strings had been replaced by numbers.</p>
  
  <p><strong>NOTE:</strong> I had the wrong revision checked out when I did the copy&amp;paste. The fprintf string has been edited!</p>
  
  <p><strong>GCC output</strong></p>
  
  <blockquote>
    <p>fedex_plus/classes.c:2425:3: warning: format <strong>‘%s’</strong> expects argument of type <strong>‘char *’</strong>, but argument 3 has type <strong>‘int’</strong> [-Wformat]</p>
  </blockquote>
  
  <p><strong>lines 2424 and 2425:</strong></p>
  
  <pre><code>fprintf(file, "\n//\t%s_ptr create_TIE();\n\tIDL_Application_instance_ptr create_TIE();\n", 
      ENTITYget_CORBAname(entity));
  </code></pre>
  
  <p><strong>function ENTITYget_CORBAname:</strong></p>
  
  <pre><code>const char *
  ENTITYget_CORBAname (Entity ent)
  {
      static char newname [BUFSIZ];
      strcpy( newname, ENTITYget_name(ent) );
      newname[0] = ToUpper (newname [0]);
      return newname;
  }
  </code></pre>