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

Re: svn commit: r1153540 - /subversion/trunk/subversion/libsvn_wc/copy.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 3 Aug 2011 12:19:12 -0400

On Aug 3, 2011 11:30 AM, <danielsh_at_apache.org> wrote:
>
> Author: danielsh
> Date: Wed Aug 3 15:29:51 2011
> New Revision: 1153540
>
> URL: http://svn.apache.org/viewvc?rev=1153540&view=rev
> Log:
> Silence a compiler warning.
>
> * subversion/libsvn_wc/copy.c
> (copy_or_move): Add a 'default' case.
>
> Discussed with: rhuijben
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/copy.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/copy.c
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=1153540&r1=1153539&r2=1153540&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/copy.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/copy.c Wed Aug 3 15:29:51 2011
> @@ -642,6 +642,8 @@ copy_or_move(svn_wc_context_t *wc_ctx,
> _("The node '%s' was not found."),
> svn_dirent_local_style(src_abspath,
> scratch_pool));
> + default:
> + ;

At least put a 'break' in there rather than a fall through. And when we *do*
use a fall through, we make that intent clear with something like:

/* FALLTHROUGH */

Cheers,
-g
Received on 2011-08-03 18:19:43 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.