title: return makes integer from pointer without a cast [-Wint-conversion] return candidate
body: <p>I'm learning C, but I find those vague compiler error messages increasingly frustrating. Here's my code:</p>
  
  <pre><code>char getkey (int minimo, int maximo, int alphalen, int index, char alpha[])  
  {  
      int cociente, residuo, cont;
      int i = 0;
      char cand[maximo+1];
      char candidate[maximo+1];
  
      while (index != 0)
      {
          cociente = index / alphalen;
          residuo = index%alphalen;
          cand[i] = residuo;
          index = cociente;
          i+=1;
      }
  
      for (cont=i-1; cont&gt;=0; cont--)  
      {   
          int pos = cand [cont];
          candidate[i] = alpha[pos];      
      }
      return candidate;
  }
  </code></pre>
  
  <p>This generates one warning:</p>
  
  <ul>
  <li>return makes integer from pointer without a cast
  
  <ul>
  <li>return candidate;</li>
  </ul></li>
  </ul>
  
  <p>Can someone explain these warning?</p>