title: warning: ignoring return value of ‘realloc’, declared with attribute warn_unused_result
body: <p>I'm curious, I'm programming in <em>C</em> on PuTTy, does anyone know how I can get rid of this warning?</p>
  
  <blockquote>
    <p>warning: ignoring return value of ‘realloc’, declared with attribute warn_unused_result [-Wunused-result] realloc(strp->data, nbytes);</p>
  </blockquote>
  
  <pre><code>                        ^
  </code></pre>
  
  <p>Relevant code to the line it wants to 'warn' me about:</p>
  
  <pre><code>         //If the previously allocated size is &gt; 0 then we can reallocate
           //otherwise we have to make a new allocation in memory
           if(strp-&gt;length &gt; 0)
           {
             realloc(strp-&gt;data, nbytes);
           }
           else
           {
             *strp = kstralloc(nbytes);
           }
  </code></pre>
  
  <p>Thanks in advance</p>