You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@wandisco.com> on 2013/09/01 18:20:46 UTC
Re: svn commit: r1519275 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
On 01.09.2013 16:40, danielsh@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@wandisco.com
Re: svn commit: r1519275 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
Posted by Blair Zajac <bl...@orcaware.com>.
On 09/01/2013 09:20 AM, Branko Čibej wrote:
> On 01.09.2013 16:40, danielsh@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