title: Type No return, in function returning non-void
body: <p>My C++ code looks like this:</p>
  
  <pre><code>int f(int i){
      if (i &gt; 0) return 1;
      if (i == 0) return 0;
      if (i &lt; 0) return -1;
  }
  </code></pre>
  
  <p>It's working but I still get:</p>
  
  <blockquote>
    <p>Warning: No return, in function returning non-void</p>
  </blockquote>
  
  <p>Even though it is obvious that all cases are covered. Is there any way to handle this in "proper" way?</p>