This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/21320] possible false positives for '$foo may be used uninitialized in this function'


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-09 21:23 -------
Reduced testcase:
void *g();

static void *count_and_verify_instructions(int *ninst,const unsigned char *p)
{
   if (p == ((void *)0))
    return g();
 *ninst = 0;
 return 0;
}
void f(int);
void *decode_window(const unsigned char *data)
{
  int ninst;
  void *svn_err__temp = count_and_verify_instructions(&ninst, data);
  if (svn_err__temp)
    return svn_err__temp;

  f (ninst);
  return 0;
}


So this is not a bug at all because g (svn_error_createf) could return null.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21320


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]