title: "Pointer from integer without cast" warning when opening file.
body: <p>I have this homework to do in C. I'm beginner so it is probably very easy, but anyway I have a problem with it. </p>
  
  <pre><code>int main(int argc, char* argv){
  
      int fd=open(argv[1], O_RDONLY);
      int fileLength=(int)lseek(fd,0,SEEK_END);
      lseek(fd,0,SEEK_SET);
      char buf[fileLength];
      read(fd,buf,fileLength);
      int i=0;
      for(i=0; i&lt;fileLength; i++){
          printf("%c",buf[i]);
      }
      printf("\n");
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre>
  warning: passing argument 1 of ‘open’ makes pointer from integer without a cast
  </pre>
  
  <p>If I write <code>"file"</code> instead of <code>argv[1]</code>, everything is ok.</p>