[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: uninitialized var

From: <mbk_at_boredom.org>
Date: 2003-03-23 17:14:19 CET

On Sun, Mar 23, 2003 at 09:55:28AM +0100, SteveKing wrote:
> Hi,
>
> I have a small request. In the file libsvn_wc/status.c, function
> svn_wc_statuses(), the variable const svn_wc_entry_t *entry
> is _not_ initialized to NULL like in the function svn_wc_status.
> I think it should be initialized to NULL like this:
>
> const svn_wc_entry_t *entry = NULL;
>
> Also, 13 lines below the line
> const svn_wc_entry_t *parent_entry;
> also should be initialized to NULL like this:
> const svn_wc_entry_t *parent_entry = NULL;
>

No code path in this function uses either of these variables uninitialized.

> That's because the docs (doxygen) say that for
> svn_wc_status_t, the entry could be NULL if not
> under version control, but it's _not_ right now.
>

I'm not sure what you mean.

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 23 17:15:19 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.