You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/05/29 16:01:24 UTC

svn commit: r1682472 - /subversion/trunk/subversion/libsvn_client/patch.c

Author: stsp
Date: Fri May 29 14:01:23 2015
New Revision: 1682472

URL: http://svn.apache.org/r1682472
Log:
Resolve a compile time warning:

patch.c: In function 'write_symlink':
patch.c:914: warning: declaration of 'link' shadows a global declaration

* subversion/libsvn_client/patch.c
  (write_symlink): Rename local variable 'link' to 'sym_link' (the name
   'symlink' produces the same warning as 'link').

Modified:
    subversion/trunk/subversion/libsvn_client/patch.c

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1682472&r1=1682471&r2=1682472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Fri May 29 14:01:23 2015
@@ -911,18 +911,18 @@ write_symlink(void *baton, const char *b
 {
   const char *target_abspath = baton;
   const char *new_name;
-  const char *link = apr_pstrndup(scratch_pool, buf, len);
+  const char *sym_link = apr_pstrndup(scratch_pool, buf, len);
 
-  if (strncmp(link, "link ", 5) != 0)
+  if (strncmp(sym_link, "link ", 5) != 0)
     return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL,
                             _("Invalid link representation"));
 
-  link += 5; /* Skip "link " */
+  sym_link += 5; /* Skip "link " */
 
   /* We assume the entire symlink is written at once, as the patch
      format is line based */
 
-  SVN_ERR(svn_io_create_unique_link(&new_name, target_abspath, link,
+  SVN_ERR(svn_io_create_unique_link(&new_name, target_abspath, sym_link,
                                     ".tmp", scratch_pool));
 
   SVN_ERR(svn_io_file_rename(new_name, target_abspath, scratch_pool));