title: passing argument 1 of 'strlen' makes pointer from integer without a cast
body: <p>It is not clear why I get a warning of:</p>
  
  <p>[Warning] passing argument 1 of 'strlen' makes pointer from integer without a cast [enabled by default]
  expected 'const char *' but argument is of type 'char'</p>
  
  <p>on two of the 3 statements containing strlen() below. </p>
  
  <p>Even when I attempted to cast *str it still gave the same warning.
  bfr is a character buffer. *str points to that char buffer after the call to
  gets(). If I use strlen(*str) I get a warning. If I use strlen(bfr) I do not. 
  But *str should be the equivalent to bfr. Thus the confusion regarding the error.</p>
  
  <p>Now in reality, strlen arg 1 is defined as strlen(const char *string). So I
  would have expected strlen(bfr) to also produce an error since bfr[] is a
  char string and not a const char either.</p>
  
  <p>And where is the integer that is being made into a pointer?</p>
  
  <p>I am using gcc under wXDev-C++.</p>
  
  <pre><code>void test(){
      FILE *fileID = fopen("somefile.txt","r");
      char *str, len;
      char bfr[16];
  
      str = fgets(bfr,16,fileID);      // str will be set equal to &amp;bfr[0]
      len = strlen(*str);              // This gives a warning
      len = strlen((const char)*str);  // This gives a warning
      len = strlen(bfr);               // This does not give a warning
  }
  </code></pre>