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

Re: svn commit: r959121 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 30 Jun 2010 09:29:18 +0100

rhuijben_at_apache.org writes:

> Author: rhuijben
> Date: Tue Jun 29 21:56:50 2010
> New Revision: 959121
>
> URL: http://svn.apache.org/viewvc?rev=959121&view=rev
> Log:
> Make the parent stub verification of navigate_to_parent() optional.
>
> * subversion/libsvn_wc/wc_db.c
> (navigate_to_parent): Add verify_parent_stub argument, to make stub
> verification optional.
> (svn_wc__db_base_add_absent_node, svn_wc__db_op_copy,
> svn_wc__db_op_copy_dir, svn_wc__db_op_add_directory,
> svn_wc__db_temp_op_remove_entry, svn_wc__db_temp_op_remove_working,
> svn_wc__db_temp_op_set_dir_depth, db_working_actual_remove,
> db_working_insert, determine_repos_info, svn_wc__db_scan_addition,
> svn_wc__db_is_wcroot): Update callers.
>
> (make_copy_txn): Update calls. Allow missing stubs.
>
> (svn_wc__db_temp_op_remove_working_stub,
> svn_wc__db_temp_op_set_rev_and_repos_relpath): Update callers.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=959121&r1=959120&r2=959121&view=diff
> ==============================================================================
> @@ -1629,21 +1631,9 @@ svn_wc__db_base_add_absent_node(svn_wc__
> if (*local_relpath == '\0')
> {
> svn_error_t *err;
> - err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite,
> + err = navigate_to_parent(&pdh, db, pdh, svn_sqlite__mode_readwrite, FALSE,
> scratch_pool);
>
> - if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> - {
> - /* Not registered in the parent; we have to add a stub */
> - svn_error_clear(err);
> -
> - SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
> - svn_dirent_dirname(local_abspath, scratch_pool),
> - svn_sqlite__mode_readwrite, scratch_pool,
> - scratch_pool));
> - }
> - else
> - SVN_ERR(err);
> VERIFY_USABLE_PDH(pdh);

That construct leaks an error:

../src/subversion/libsvn_wc/wc_db.c: In function ‘svn_wc__db_base_add_absent_node’:
../src/subversion/libsvn_wc/wc_db.c:1633:20: warning: variable ‘err’ set but not used
../src/subversion/libsvn_wc/wc_db.c: In function ‘svn_wc__db_op_copy_dir’:
../src/subversion/libsvn_wc/wc_db.c:3048:20: warning: variable ‘err’ set but not used
../src/subversion/libsvn_wc/wc_db.c: In function ‘svn_wc__db_op_add_directory’:
../src/subversion/libsvn_wc/wc_db.c:3243:20: warning: variable ‘err’ set but not used

-- 
Philip
Received on 2010-06-30 11:01:08 CEST

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.