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

Re: svn commit: r1445904 - in /subversion/trunk/subversion: libsvn_wc/diff_editor.c tests/cmdline/diff_tests.py

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 14 Feb 2013 00:24:59 +0000

rhuijben_at_apache.org writes:

> Author: rhuijben
> Date: Wed Feb 13 20:27:45 2013
> New Revision: 1445904
>
> URL: http://svn.apache.org/r1445904
> Log:
> Refactor the repos-wc diff to be fully ancestry aware, but at the same
> time able to suppress ancestry differences for files on files and
> directories on directories.

> +static svn_error_t *
> +report_base_only_dir(struct edit_baton_t *eb,
> + const char *local_abspath,
> + const char *relpath,
> + svn_depth_t depth,
> + void *parent_baton,
> + apr_pool_t *scratch_pool)
> +{
> + void *dir_baton = NULL;
> + svn_boolean_t skip = FALSE;
> + svn_boolean_t skip_children = FALSE;
> + svn_diff_source_t *left_src;
> +
> + left_src = svn_diff__source_create(eb->revnum, scratch_pool);
> +
> + SVN_ERR(eb->processor->dir_opened(&dir_baton, &skip, &skip_children,
> + relpath,
> + left_src,
> + NULL /* right_src */,
> + NULL /* copyfrom_src */,
> + parent_baton,
> + eb->processor,
> + scratch_pool, scratch_pool));
> +
> + if (!skip_children && depth == svn_depth_unknown || depth > svn_depth_empty)

../src/subversion/libsvn_wc/diff_editor.c: In function 'report_base_only_dir':
../src/subversion/libsvn_wc/diff_editor.c:1335:3: warning: suggest parentheses around '&&' within '||' [-Wparentheses]

As written it means:

if ((!skip_children && depth == svn_depth_unknown) || depth > svn_depth_empty)

but this looks more plausible:

if (!skip_children && (depth == svn_depth_unknown || depth > svn_depth_empty))

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-02-14 01:25:41 CET

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.