title: Incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *'
body: <p>I have the following code which is failing with EXC_BAD_ACCESS (code=1) and has the following warning:</p>
  
  <p>Incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *'</p>
  
  <pre><code>char *printb(fmt,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
  {
      static char string[256];
      sprintf(string,fmt,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
      return(string);
  }
  </code></pre>
  
  <p>printb is being called by this code:</p>
  
  <pre><code>    if (gotargs) fname = *(argv++);
      else do {
          printf("file name #%d: ", i+1);
          fname = gets(inbuf);
      } while (*fname == 0);
      if ((gbuf=fopen(fname, "r")) == NULL)
          error(printb("I can't find '%s'", fname));
      printf("reading '%s'...\n", fname);
      if (fgets((lp = inbuf), 512, gbuf) == NULL)
          error("file is empty");
  </code></pre>
  
  <p>Also, how can I convert the gets() to fgets() properly?</p>
  
  <p>Thanks</p>