title: C - Assignment makes integer from pointer without a cast
body: <p>I'm getting this error: <br />
  Warning: assignment makes integer from pointer without a cast [enabled by default]<br />This is my source code: <br /></p>
  
  <pre><code>int     ft_replace(char const *s1)
  {
      int     result;
  
      result = 0;
      for (; *s1 != '\0'; ++s1)
      {
          if (*s1 == '-')
              result = s1; // Warning here
      }
  
      return (result);
  }
  </code></pre>
  
  <p>So, I'm getting an error ( warning ) and my result of my function ft_replace is fxc... <br />It return me a result like 4227111 and I don't know why<br /> I would like my function when it find the last char here this is ' - ' it return the position of the array.</p>
  
  <p>So a string which contains " Hel-l-o " -> Return 6 <br />
  A string which contains    " He-llo  " -> Return 3 <br />
  A string which contains    " Hell-o- " -> Return 7</p>