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

Re: svn commit: r1519275 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Sun, 01 Sep 2013 18:20:46 +0200

On 01.09.2013 16:40, danielsh_at_apache.org wrote:
> Author: danielsh
> Date: Sun Sep 1 14:40:55 2013
> New Revision: 1519275
>
> URL: http://svn.apache.org/r1519275
> Log:
> Fix a compiler warning. No functional change.
>
> * subversion/libsvn_subr/cache-membuffer.c
> (ensure_data_insertable_l1): Satisfy the -Wparentheses nanny.
>
> Perhaps we should just disable that particular warning flag...
>
> Modified:
> subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1519275&r1=1519274&r2=1519275&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Sun Sep 1 14:40:55 2013
> @@ -1360,10 +1360,12 @@ ensure_data_insertable_l1(svn_membuffer_
>
> /* We might have touched the group that contains ENTRY. Recheck. */
> if (entry_index == cache->l1.next)
> - if (keep)
> - promote_entry(cache, entry);
> - else
> - drop_entry(cache, entry);
> + {
> + if (keep)
> + promote_entry(cache, entry);
> + else
> + drop_entry(cache, entry);
> + }
> }
> }

This is exactly the kind of situation where the extra braces make the
code much clearer. I'd say the warning should stay.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-09-01 18:21:35 CEST

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