title: FORWARD_NULL Vs UNINIT Coverity errors in C
body: <p>when a pointer is initialized to NULL, getting "FORWARD_NULL" coverity errors and when the NULL initialization is removed, it throws UNINIT coverity errors. The code is as below.</p>
  
  <p>I am very new to coverity. If its a very basic question also, please help.</p>
  
  <p>I am </p>
  
  <p>1) declaring a pointer, </p>
  
  <p>2) Initializing it to NULL and </p>
  
  <p>3) deferring it without assigning anything to it. </p>
  
  <p>This deference is an argument in a function call inside which, it will be filled in. Getting FORWARD_NULL errors for the same. Started with Coverity works, from yesterday only. </p>
  
  <pre><code>int fn1()
  {
      strct1 *pvarA = NULL;
      if (fn2(&amp;pvarA) != 0) // derefering NULL pointer error.
      {
          return 1;
      }
      ...
      /* some code */
  }
  
  int fn2(strct1 **pvarA)
  {
      ...
      /* some code */
      *pvarA = varA;
      /* some code */
      return 0;
  }
  </code></pre>
  
  <p>Thanks,
  Preethi</p>