title: control reaches end of non-void function [-Werror=return-type]
body: <p>Even after using default else statement I am getting this error</p>
  
  <pre><code>int max_of_four(int a, int b, int c, int d)
  {
      if((a&gt;b)&amp;&amp;(a&gt;c))
      {        
          if(a&gt;d)
              return a;
      }
      else if((b&gt;c)&amp;&amp;(b&gt;d))
      {  
          return b; 
      }
      else if(c&gt;d)
      { 
          return c; 
      }
      else 
          return d;
  }
  </code></pre>