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

Re: svn commit: r1739632 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c

From: Branko Čibej <brane_at_apache.org>
Date: Sun, 17 Apr 2016 19:04:19 +0200

On 17.04.2016 19:01, brane_at_apache.org wrote:
> Author: brane
> Date: Sun Apr 17 17:01:19 2016
> New Revision: 1739632
>
> URL: http://svn.apache.org/viewvc?rev=1739632&view=rev
> Log:
> Silence a -Wswitch warning in the reverse-patch code.
>
> * subversion/libsvn_diff/parse-diff.c (svn_diff_parse_next_patch):
> Add cases for all enumeration values to the switch statement.
>
> Modified:
> subversion/trunk/subversion/libsvn_diff/parse-diff.c
>
> Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=1739632&r1=1739631&r2=1739632&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
> +++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Sun Apr 17 17:01:19 2016
> @@ -2275,11 +2275,14 @@ svn_diff_parse_next_patch(svn_patch_t **
> patch->operation = svn_diff_op_added;
> break;
>
> - /* ### case svn_diff_op_copied:
> - ### case svn_diff_op_moved:*/
> -
> case svn_diff_op_modified:
> - break; /* Stays modify */
> + break; /* Stays modified. */
> +
> + case svn_diff_op_copied:
> + case svn_diff_op_moved:
> + break; /* Stays copied or moved, just in the other direction. */
> + case svn_diff_op_unchanged:
> + break; /* Stays unchanged, of course. */
> }
>
> ts_tmp = patch->old_executable_bit;

Bert, I think you wrote the original switch statement. I believe my
change is both correct and a no-op (other than silencing the warning)
but would appreciate a second pair of eyes here.

-- Brane
Received on 2016-04-17 19:04:00 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.