[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: Blair Zajac <blair_at_orcaware.com>
Date: Sun, 01 Sep 2013 10:51:07 -0700

On 09/01/2013 09:20 AM, Branko Čibej wrote:
> 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.

+1.

Blair
Received on 2013-09-01 19:51:45 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.