title: What to do about wrong "control reaches end of non-void function" gcc warning?
body: <pre><code>$ cat t.cpp
  int sign(int i) {
      if(i &gt; 0) return 1;
      if(i == 0) return 0;
      if(i &lt; 0) return -1;
  }
  $ g++ -c t.cpp -Wall
  t.cpp: In function ‘int sign(int)’:
  t.cpp:5: warning: control reaches end of non-void function
  $
  </code></pre>
  
  <p>What do I do about this?</p>
  
  <p>Stop using -Wall as it's clearly wrong? Add a bogus return 0 at the end? Clutter the code with "else" clauses?</p>