On 01.09.2013 16:40, danie...@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. br...@wandisco.com

Reply via email to