You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2011/05/21 14:02:21 UTC

Fwd: [Bert Huijben: RE: svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c]

CC += dev@

----- Forwarded message from Bert Huijben <be...@qqmail.nl> -----

> Date: Fri, 20 May 2011 05:26:51 -0700
> From: Bert Huijben <be...@qqmail.nl>
> To: "philip@apache.org" <ph...@apache.org>,
> 	"commits@subversion.apache.org" <co...@subversion.apache.org>
> Subject: RE: svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c
> Reply-To: dev@subversion.apache.org
> Message-ID: <-3...@unknownmsgid>
> 
> A pointer to this variable is used outside that inner scope!
> 
> I added that comment to document that problem as it may cause segfaults.
> 
> Bert Huijben (Cell phone) From: philip@apache.org
> Sent: vrijdag 20 mei 2011 12:24
> To: commits@subversion.apache.org
> Subject: svn commit: r1125313
> - /subversion/trunk/subversion/libsvn_client/externals.c
> Author: philip
> Date: Fri May 20 10:23:42 2011
> New Revision: 1125313
> 
> URL: http://svn.apache.org/viewvc?rev=1125313&view=rev
> Log:
> * subversion/libsvn_client/externals.c
>   (handle_external_item_change): Move a variable to an inner scope
>    to avoid a shadowing warning.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_client/externals.c
> 
> Modified: subversion/trunk/subversion/libsvn_client/externals.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1125313&r1=1125312&r2=1125313&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_client/externals.c (original)
> +++ subversion/trunk/subversion/libsvn_client/externals.c Fri May 20
> 10:23:42 2011
> @@ -701,7 +701,6 @@ handle_external_item_change(const struct
>                              apr_pool_t *scratch_pool)
>  {
>    svn_ra_session_t *ra_session;
> -  svn_node_kind_t kind; /* Stored as pointer in ra_cache */
>    svn_client__ra_session_from_path_results ra_cache = { 0 };
>    const char *local_abspath;
>    const char *old_url;
> @@ -762,6 +761,8 @@ handle_external_item_change(const struct
>       determine if the external is a file or directory. */
>    if (new_item)
>      {
> +      svn_node_kind_t kind;
> +
>        /* Get the RA connection. */
>        SVN_ERR(svn_client__ra_session_from_path(&ra_session,
>                                                 &ra_cache.ra_revnum,

----- End forwarded message -----

Re: Fwd: [Bert Huijben: RE: svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c]

Posted by Philip Martin <ph...@wandisco.com>.
>> Date: Fri, 20 May 2011 05:26:51 -0700
>> From: Bert Huijben <be...@qqmail.nl>
>> To: "philip@apache.org" <ph...@apache.org>,
>> 	"commits@subversion.apache.org" <co...@subversion.apache.org>
>> Subject: RE: svn commit: r1125313 - /subversion/trunk/subversion/libsvn_client/externals.c
>> Reply-To: dev@subversion.apache.org
>> Message-ID: <-3...@unknownmsgid>
>> 
>> A pointer to this variable is used outside that inner scope!
>> 
>> I added that comment to document that problem as it may cause segfaults.

Sorry about that.  Your new solution is much better :)

-- 
Philip