title: return nothing from non-void function in C
body: <p>what is considered best practice in the following snippet:</p>
  
  <pre><code>int foo(struct data *bar, struct info bla) {
      if (!bar) {
          bla-&gt;status = 0;
          return;
      }
      ...
  }
  </code></pre>
  
  <p>in fact, it works fine. but i'm feeling uncomfortable with <code>gcc</code> giving me a warning.</p>
  
  <hr>
  
  <p>here is the actual code:</p>
  
  <pre><code>static int pop(struct stack **stack, struct info *info) {
          int ret;
          struct stack *tmp;
  
          if (!*stack) {
                  info-&gt;error = 0;
                  return;
          }
  
          ret = (*stack)-&gt;data;
          tmp = *stack;
          *stack = (*stack)-&gt;next;
          free(tmp);
  
          return ret;
  }
  </code></pre>