You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/10/08 22:13:31 UTC

svn commit: r1006005 [2/10] - in /subversion/branches/object-model: ./ contrib/client-side/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/tigris/subversio...

Modified: subversion/branches/object-model/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_client/patch.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/object-model/subversion/libsvn_client/patch.c Fri Oct  8 20:13:26 2010
@@ -631,13 +631,16 @@ init_patch_target(patch_target_t **patch
                                                    scratch_pool));
         }
 
-      /* ### Is it ok to set target->added here? Isn't the target supposed to
-       * ### be marked as added after it's been proven that it can be added?
-       * ### One alternative is to include a git_added flag. Or maybe we
-       * ### should have kept the patch field in patch_target_t? Then we
-       * ### could have checked for target->patch->operation == added */
+      /* ### Is it ok to set the operation of the target already here? Isn't
+       * ### the target supposed to be marked with an operation after we have
+       * ### determined that the changes will apply cleanly to the WC? Maybe
+       * ### we should have kept the patch field in patch_target_t to be
+       * ### able to distinguish between 'what the patch says we should do' 
+       * ### and 'what we can do with the given state of our WC'. */
       if (patch->operation == svn_diff_op_added)
         target->added = TRUE;
+      else if (patch->operation == svn_diff_op_deleted)
+        target->deleted = TRUE;
 
       SVN_ERR(svn_stream_open_unique(&patched_raw,
                                      &target->patched_path, NULL,
@@ -869,7 +872,7 @@ match_hunk(svn_boolean_t *matched, targe
       /* If the last line doesn't have a newline, we get EOF but still
        * have a non-empty line to compare. */
       if ((hunk_eof && hunk_line->len == 0) ||
-          (content_info->eof && strlen(target_line) == 0))
+          (content_info->eof && *target_line == 0))
         break;
 
       /* Leading/trailing fuzzy lines always match. */
@@ -936,7 +939,6 @@ scan_for_match(svn_linenum_t *matched_li
          ! content_info->eof)
     {
       svn_boolean_t matched;
-      int i;
 
       svn_pool_clear(iterpool);
 
@@ -948,6 +950,7 @@ scan_for_match(svn_linenum_t *matched_li
       if (matched)
         {
           svn_boolean_t taken = FALSE;
+          int i;
 
           /* Don't allow hunks to match at overlapping locations. */
           for (i = 0; i < content_info->hunks->nelts; i++)
@@ -1235,24 +1238,6 @@ get_hunk_info(hunk_info_t **hi, patch_ta
   return SVN_NO_ERROR;
 }
 
-/* Attempt to write LEN bytes of DATA to STREAM, the underlying file
- * of which is at ABSPATH. Fail if not all bytes could be written to
- * the stream. Do temporary allocations in POOL. */
-static svn_error_t *
-try_stream_write(svn_stream_t *stream, const char *abspath,
-                 const char *data, apr_size_t len, apr_pool_t *pool)
-{
-  apr_size_t written;
-
-  written = len;
-  SVN_ERR(svn_stream_write(stream, data, &written));
-  if (written != len)
-    return svn_error_createf(SVN_ERR_IO_WRITE_ERROR, NULL,
-                             _("Error writing to '%s'"),
-                             svn_dirent_local_style(abspath, pool));
-  return SVN_NO_ERROR;
-}
-
 /* Copy lines to the patched stream until the specified LINE has been
  * reached. Indicate in *EOF whether end-of-file was encountered while
  * reading from the target.
@@ -1269,16 +1254,16 @@ copy_lines_to_target(target_content_info
          && ! content_info->eof)
     {
       const char *target_line;
+      apr_size_t len;
 
       svn_pool_clear(iterpool);
 
       SVN_ERR(read_line(content_info, &target_line, iterpool, iterpool));
       if (! content_info->eof)
         target_line = apr_pstrcat(iterpool, target_line, content_info->eol_str,
-                                  NULL);
-
-      SVN_ERR(try_stream_write(content_info->patched, patched_path,
-                               target_line, strlen(target_line), iterpool));
+                                  (char *)NULL);
+      len = strlen(target_line);
+      SVN_ERR(svn_stream_write(content_info->patched, target_line, &len));
     }
   svn_pool_destroy(iterpool);
 
@@ -1340,12 +1325,17 @@ reject_hunk(patch_target_t *target, targ
       if (! eof)
         {
           if (hunk_line->len >= 1)
-            SVN_ERR(try_stream_write(content_info->reject, target->reject_path,
-                                     hunk_line->data, hunk_line->len,
-                                     iterpool));
+            {
+              len = hunk_line->len;
+              SVN_ERR(svn_stream_write(content_info->reject, hunk_line->data,
+                                       &len));
+            }
+
           if (eol_str)
-            SVN_ERR(try_stream_write(content_info->reject, target->reject_path,
-                                     eol_str, strlen(eol_str), iterpool));
+            {
+              len = strlen(eol_str);
+              SVN_ERR(svn_stream_write(content_info->reject, eol_str, &len));
+            }
         }
     }
   while (! eof);
@@ -1418,11 +1408,15 @@ apply_hunk(patch_target_t *target, targe
       if (! eof && lines_read > hi->fuzz &&
           lines_read <= svn_diff_hunk_get_modified_length(hi->hunk) - hi->fuzz)
         {
+          apr_size_t len;
+
           if (hunk_line->len >= 1)
-            SVN_ERR(try_stream_write(content_info->patched, 
-                                     target->patched_path,
-                                     hunk_line->data, hunk_line->len,
-                                     iterpool));
+            {
+              len = hunk_line->len;
+              SVN_ERR(svn_stream_write(content_info->patched, hunk_line->data,
+                                       &len));
+            }
+
           if (eol_str)
             {
               /* Use the EOL as it was read from the patch file,
@@ -1430,9 +1424,8 @@ apply_hunk(patch_target_t *target, targe
               if (content_info->eol_style != svn_subst_eol_style_none)
                 eol_str = content_info->eol_str;
 
-              SVN_ERR(try_stream_write(content_info->patched,
-                                       target->patched_path, eol_str,
-                                       strlen(eol_str), iterpool));
+              len = strlen(eol_str);
+              SVN_ERR(svn_stream_write(content_info->patched, eol_str, &len));
             }
         }
     }
@@ -2639,7 +2632,9 @@ apply_patches(void *baton,
 
               if (! target->skipped)
                 {
-                  if (target->has_text_changes || target->added)
+                  if (target->has_text_changes 
+                      || target->added 
+                      || target->deleted)
                     SVN_ERR(install_patched_target(target, btn->abs_wc_path,
                                                    btn->ctx, btn->dry_run,
                                                    iterpool));

Modified: subversion/branches/object-model/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_client/repos_diff.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/object-model/subversion/libsvn_client/repos_diff.c Fri Oct  8 20:13:26 2010
@@ -521,7 +521,7 @@ diff_deleted_dir(const char *dir,
                                 mimetype1, mimetype2,
                                 b->pristine_props,
                                 b->edit_baton->diff_cmd_baton,
-                                pool));
+                                iterpool));
         }
  
       if (dirent->kind == svn_node_dir)
@@ -1244,7 +1244,7 @@ absent_directory(const char *path,
       svn_wc_notify_t *notify
         = svn_wc_create_notify(svn_dirent_join(pb->wcpath,
                                                svn_relpath_basename(path,
-                                                                    pool),
+                                                                    NULL),
                                                pool),
                                svn_wc_notify_skip, pool);
       notify->kind = svn_node_dir;

Modified: subversion/branches/object-model/subversion/libsvn_client/repos_diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_client/repos_diff_summarize.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_client/repos_diff_summarize.c (original)
+++ subversion/branches/object-model/subversion/libsvn_client/repos_diff_summarize.c Fri Oct  8 20:13:26 2010
@@ -196,7 +196,7 @@ diff_deleted_dir(const char *dir,
                                 &kind,
                                 iterpool));
 
-      sum = apr_pcalloc(pool, sizeof(*sum));
+      sum = apr_pcalloc(iterpool, sizeof(*sum));
       sum->summarize_kind = svn_client_diff_summarize_kind_deleted;
       sum->path = path;
       sum->node_kind = kind;

Modified: subversion/branches/object-model/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_client/util.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_client/util.c (original)
+++ subversion/branches/object-model/subversion/libsvn_client/util.c Fri Oct  8 20:13:26 2010
@@ -218,7 +218,9 @@ svn_client__path_relative_to_root(const 
         }
       rel_url = svn_path_uri_decode(rel_url, result_pool);
       *rel_path = include_leading_slash
-                    ? apr_pstrcat(result_pool, "/", rel_url, NULL) : rel_url;
+                    ? apr_pstrcat(result_pool, "/", rel_url,
+                                  (char *)NULL)
+                    : rel_url;
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/object-model/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_delta/svndiff.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/object-model/subversion/libsvn_delta/svndiff.c Fri Oct  8 20:13:26 2010
@@ -352,10 +352,13 @@ struct decode_baton
 };
 
 
-/* Decode an svndiff-encoded integer into VAL and return a pointer to
+/* Decode an svndiff-encoded integer into *VAL and return a pointer to
    the byte after the integer.  The bytes to be decoded live in the
-   range [P..END-1].  See the comment for encode_int earlier in this
-   file for more detail on the encoding format.  */
+   range [P..END-1].  If these bytes do not contain a whole encoded
+   integer, return NULL; in this case *VAL is undefined.
+
+   See the comment for encode_int() earlier in this file for more detail on
+   the encoding format.  */
 static const unsigned char *
 decode_file_offset(svn_filesize_t *val,
                    const unsigned char *p,
@@ -381,7 +384,6 @@ decode_file_offset(svn_filesize_t *val,
       }
     }
 
-  *val = temp;
   return NULL;
 }
 
@@ -409,7 +411,6 @@ decode_size(apr_size_t *val,
       }
     }
 
-  *val = temp;
   return NULL;
 }
 

Modified: subversion/branches/object-model/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_diff/diff_file.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/object-model/subversion/libsvn_diff/diff_file.c Fri Oct  8 20:13:26 2010
@@ -1130,11 +1130,11 @@ svn_diff_file_output_unified3(svn_stream
                               apr_pool_t *pool)
 {
   svn_diff__file_output_baton_t baton;
-  int i;
 
   if (svn_diff_contains_diffs(diff))
     {
       const char **c;
+      int i;
 
       memset(&baton, 0, sizeof(baton));
       baton.output_stream = output_stream;
@@ -1161,42 +1161,44 @@ svn_diff_file_output_unified3(svn_stream
       SVN_ERR(svn_utf_cstring_from_utf8_ex2(&baton.insert_str, "+",
                                             header_encoding, pool));
 
-  if (relative_to_dir)
-    {
-      /* Possibly adjust the "original" and "modified" paths shown in
-         the output (see issue #2723). */
-      const char *child_path;
-
-      if (! original_header)
+      if (relative_to_dir)
         {
-          child_path = svn_dirent_is_child(relative_to_dir,
-                                           original_path, pool);
-          if (child_path)
-            original_path = child_path;
-          else
-            return svn_error_createf(
-                               SVN_ERR_BAD_RELATIVE_PATH, NULL,
-                               _("Path '%s' must be an immediate child of "
-                                 "the directory '%s'"),
-                               svn_dirent_local_style(original_path, pool),
-                               svn_dirent_local_style(relative_to_dir, pool));
-        }
+          /* Possibly adjust the "original" and "modified" paths shown in
+             the output (see issue #2723). */
+          const char *child_path;
 
-      if (! modified_header)
-        {
-          child_path = svn_dirent_is_child(relative_to_dir,
-                                           modified_path, pool);
-          if (child_path)
-            modified_path = child_path;
-          else
-            return svn_error_createf(
-                               SVN_ERR_BAD_RELATIVE_PATH, NULL,
-                               _("Path '%s' must be an immediate child of "
-                                 "the directory '%s'"),
-                               svn_dirent_local_style(modified_path, pool),
-                               svn_dirent_local_style(relative_to_dir, pool));
+          if (! original_header)
+            {
+              child_path = svn_dirent_is_child(relative_to_dir,
+                                               original_path, pool);
+              if (child_path)
+                original_path = child_path;
+              else
+                return svn_error_createf(
+                                   SVN_ERR_BAD_RELATIVE_PATH, NULL,
+                                   _("Path '%s' must be an immediate child of "
+                                     "the directory '%s'"),
+                                   svn_dirent_local_style(original_path, pool),
+                                   svn_dirent_local_style(relative_to_dir,
+                                                          pool));
+            }
+
+          if (! modified_header)
+            {
+              child_path = svn_dirent_is_child(relative_to_dir,
+                                               modified_path, pool);
+              if (child_path)
+                modified_path = child_path;
+              else
+                return svn_error_createf(
+                                   SVN_ERR_BAD_RELATIVE_PATH, NULL,
+                                   _("Path '%s' must be an immediate child of "
+                                     "the directory '%s'"),
+                                   svn_dirent_local_style(modified_path, pool),
+                                   svn_dirent_local_style(relative_to_dir,
+                                                          pool));
+            }
         }
-    }
 
       for (i = 0; i < 2; i++)
         {

Modified: subversion/branches/object-model/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_diff/parse-diff.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/object-model/subversion/libsvn_diff/parse-diff.c Fri Oct  8 20:13:26 2010
@@ -150,7 +150,7 @@ parse_range(svn_linenum_t *start, svn_li
 {
   char *comma;
 
-  if (strlen(range) == 0)
+  if (*range == 0)
     return FALSE;
 
   comma = strstr(range, ",");

Modified: subversion/branches/object-model/subversion/libsvn_fs_base/bdb/locks-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_base/bdb/locks-table.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_base/bdb/locks-table.c Fri Oct  8 20:13:26 2010
@@ -250,7 +250,7 @@ svn_fs_bdb__locks_get(svn_fs_t *fs,
   /* As long as the prefix of the returned KEY matches LOOKUP_PATH we
      know it is either LOOKUP_PATH or a decendant thereof.  */
   if (strcmp(path, "/") != 0)
-    lookup_path = apr_pstrcat(pool, path, "/", NULL);
+    lookup_path = apr_pstrcat(pool, path, "/", (char *)NULL);
   while ((! db_err)
          && strncmp(lookup_path, key.data, strlen(lookup_path)) == 0)
     {

Modified: subversion/branches/object-model/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_base/lock.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_base/lock.c Fri Oct  8 20:13:26 2010
@@ -250,7 +250,7 @@ svn_fs_base__generate_lock_token(const c
      generate a URI that matches the DAV RFC.  We could change this to
      some other URI scheme someday, if we wish. */
   *token = apr_pstrcat(pool, "opaquelocktoken:",
-                       svn_uuid_generate(pool), NULL);
+                       svn_uuid_generate(pool), (char *)NULL);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c Fri Oct  8 20:13:26 2010
@@ -1159,7 +1159,6 @@ svn_fs_base__purge_txn(svn_fs_t *fs,
 {
   struct cleanup_txn_args args;
   transaction_t *txn;
-  int i;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
 
@@ -1182,6 +1181,8 @@ svn_fs_base__purge_txn(svn_fs_t *fs,
   /* Kill the transaction's copies (which should gracefully...). */
   if (txn->copies)
     {
+      int i;
+
       for (i = 0; i < txn->copies->nelts; i++)
         {
           SVN_ERR(svn_fs_base__retry_txn

Modified: subversion/branches/object-model/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_base/tree.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_base/tree.c Fri Oct  8 20:13:26 2010
@@ -1775,7 +1775,7 @@ deltify_mutable(svn_fs_t *fs,
        For 1.6 and beyond, we just deltify the current node against its
        predecessors, using skip deltas similar to the way FSFS does.  */
 
-    int pred_count, nlevels, lev, count;
+    int pred_count;
     const svn_fs_id_t *pred_id;
     struct txn_pred_count_args tpc_args;
     apr_pool_t *subpools[2];
@@ -1861,6 +1861,8 @@ deltify_mutable(svn_fs_t *fs,
       }
     else
       {
+        int nlevels, lev, count;
+
         /**** REVERSE DELTA STORAGE ****/
 
         /* Decide how many predecessors to redeltify.  To save overhead,

Modified: subversion/branches/object-model/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_fs/caching.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_fs/caching.c Fri Oct  8 20:13:26 2010
@@ -198,7 +198,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   const char *prefix = apr_pstrcat(pool,
                                    "fsfs:", ffd->uuid,
                                    "/", fs->path, ":",
-                                   NULL);
+                                   (char *)NULL);
   svn_memcache_t *memcache;
   svn_boolean_t no_handler;
 
@@ -219,7 +219,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                        deserialize_id,
                                        sizeof(svn_revnum_t),
                                        apr_pstrcat(pool, prefix, "RRI",
-                                                   NULL),
+                                                   (char *)NULL),
                                        fs->pool));
   else
     SVN_ERR(svn_cache__create_inprocess(&(ffd->rev_root_id_cache),
@@ -239,7 +239,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                        svn_fs_fs__dag_deserialize,
                                        APR_HASH_KEY_STRING,
                                        apr_pstrcat(pool, prefix, "DAG",
-                                                   NULL),
+                                                   (char *)NULL),
                                        fs->pool));
   else
     SVN_ERR(svn_cache__create_inprocess(&(ffd->rev_node_cache),
@@ -259,7 +259,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                        svn_fs_fs__dir_entries_deserialize,
                                        APR_HASH_KEY_STRING,
                                        apr_pstrcat(pool, prefix, "DIR",
-                                                   NULL),
+                                                   (char *)NULL),
                                        fs->pool));
   else
     SVN_ERR(svn_cache__create_inprocess(&(ffd->dir_cache),
@@ -279,7 +279,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                        manifest_deserialize,
                                        sizeof(svn_revnum_t),
                                        apr_pstrcat(pool, prefix, "PACK-MANIFEST",
-                                                   NULL),
+                                                   (char *)NULL),
                                        fs->pool));
   else
     SVN_ERR(svn_cache__create_inprocess(&(ffd->packed_offset_cache),
@@ -298,7 +298,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                          NULL, NULL,
                                          APR_HASH_KEY_STRING,
                                          apr_pstrcat(pool, prefix, "TEXT",
-                                                     NULL),
+                                                     (char *)NULL),
                                          fs->pool));
       if (! no_handler)
         SVN_ERR(svn_cache__set_error_handler(ffd->fulltext_cache,

Modified: subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c Fri Oct  8 20:13:26 2010
@@ -332,7 +332,8 @@ path_txn_dir(svn_fs_t *fs, const char *t
 {
   SVN_ERR_ASSERT_NO_RETURN(txn_id != NULL);
   return svn_dirent_join_many(pool, fs->path, PATH_TXNS_DIR,
-                              apr_pstrcat(pool, txn_id, PATH_EXT_TXN, NULL),
+                              apr_pstrcat(pool, txn_id, PATH_EXT_TXN,
+                                          (char *)NULL),
                               NULL);
 }
 
@@ -373,7 +374,8 @@ path_txn_proto_rev(svn_fs_t *fs, const c
   fs_fs_data_t *ffd = fs->fsap_data;
   if (ffd->format >= SVN_FS_FS__MIN_PROTOREVS_DIR_FORMAT)
     return svn_dirent_join_many(pool, fs->path, PATH_TXN_PROTOS_DIR,
-                                apr_pstrcat(pool, txn_id, PATH_EXT_REV, NULL),
+                                apr_pstrcat(pool, txn_id, PATH_EXT_REV,
+                                            (char *)NULL),
                                 NULL);
   else
     return svn_dirent_join(path_txn_dir(fs, txn_id, pool), PATH_REV, pool);
@@ -386,7 +388,7 @@ path_txn_proto_rev_lock(svn_fs_t *fs, co
   if (ffd->format >= SVN_FS_FS__MIN_PROTOREVS_DIR_FORMAT)
     return svn_dirent_join_many(pool, fs->path, PATH_TXN_PROTOS_DIR,
                                 apr_pstrcat(pool, txn_id, PATH_EXT_REV_LOCK,
-                                            NULL),
+                                            (char *)NULL),
                                 NULL);
   else
     return svn_dirent_join(path_txn_dir(fs, txn_id, pool), PATH_REV_LOCK,
@@ -409,14 +411,14 @@ static APR_INLINE const char *
 path_txn_node_props(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
 {
   return apr_pstrcat(pool, path_txn_node_rev(fs, id, pool), PATH_EXT_PROPS,
-                     NULL);
+                     (char *)NULL);
 }
 
 static APR_INLINE const char *
 path_txn_node_children(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool)
 {
   return apr_pstrcat(pool, path_txn_node_rev(fs, id, pool),
-                     PATH_EXT_CHILDREN, NULL);
+                     PATH_EXT_CHILDREN, (char *)NULL);
 }
 
 static APR_INLINE const char *
@@ -606,6 +608,10 @@ with_some_lock(svn_fs_t *fs,
         SVN_ERR(update_min_unpacked_rev(fs, pool));
       if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
         SVN_ERR(update_min_unpacked_revprop(fs, pool));
+#if 0 /* Might be a good idea? */
+      SVN_ERR(get_youngest(&ffd->youngest_rev_cache, fs->path,
+                           pool));
+#endif
       err = body(baton, subpool);
     }
 
@@ -4561,7 +4567,8 @@ create_txn_dir(const char **id_p, svn_fs
   txn_dir = svn_dirent_join_many(pool,
                                  fs->path,
                                  PATH_TXNS_DIR,
-                                 apr_pstrcat(pool, *id_p, PATH_EXT_TXN, NULL),
+                                 apr_pstrcat(pool, *id_p, PATH_EXT_TXN,
+                                             (char *)NULL),
                                  NULL);
 
   return svn_io_dir_make(txn_dir, APR_OS_DEFAULT, pool);
@@ -4929,7 +4936,7 @@ get_new_txn_node_id(const char **node_id
 
   SVN_ERR(write_next_ids(fs, txn_id, node_id, cur_copy_id, pool));
 
-  *node_id_p = apr_pstrcat(pool, "_", cur_node_id, NULL);
+  *node_id_p = apr_pstrcat(pool, "_", cur_node_id, (char *)NULL);
 
   return SVN_NO_ERROR;
 }
@@ -6417,7 +6424,7 @@ svn_fs_fs__reserve_copy_id(const char **
 
   SVN_ERR(write_next_ids(fs, txn_id, cur_node_id, copy_id, pool));
 
-  *copy_id_p = apr_pstrcat(pool, "_", cur_copy_id, NULL);
+  *copy_id_p = apr_pstrcat(pool, "_", cur_copy_id, (char *)NULL);
 
   return SVN_NO_ERROR;
 }
@@ -6976,7 +6983,7 @@ svn_fs_fs__set_uuid(svn_fs_t *fs,
     uuid = svn_uuid_generate(pool);
 
   /* Make sure we have a copy in FS->POOL, and append a newline. */
-  my_uuid = apr_pstrcat(fs->pool, uuid, "\n", NULL);
+  my_uuid = apr_pstrcat(fs->pool, uuid, "\n", (char *)NULL);
   my_uuid_len = strlen(my_uuid);
 
   SVN_ERR(svn_io_write_unique(&tmp_path,

Modified: subversion/branches/object-model/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_fs/lock.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_fs/lock.c Fri Oct  8 20:13:26 2010
@@ -860,7 +860,7 @@ svn_fs_fs__generate_lock_token(const cha
      generate a URI that matches the DAV RFC.  We could change this to
      some other URI scheme someday, if we wish. */
   *token = apr_pstrcat(pool, "opaquelocktoken:",
-                       svn_uuid_generate(pool), NULL);
+                       svn_uuid_generate(pool), (char *)NULL);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/object-model/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_fs/tree.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_fs/tree.c Fri Oct  8 20:13:26 2010
@@ -2173,7 +2173,7 @@ fs_copied_from(svn_revnum_t *rev_p,
 
   if (copyfrom_str)
     {
-      if (strlen(copyfrom_str) == 0)
+      if (*copyfrom_str == 0)
         {
           /* We have a cached entry that says there is no copyfrom
              here. */

Modified: subversion/branches/object-model/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_local/ra_plugin.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_local/ra_plugin.c Fri Oct  8 20:13:26 2010
@@ -250,7 +250,6 @@ make_reporter(svn_ra_session_t *session,
 {
   svn_ra_local__session_baton_t *sess = session->priv;
   void *rbaton;
-  size_t repos_url_len;
   const char *other_fs_path = NULL;
   const char *repos_url_decoded;
 
@@ -262,6 +261,8 @@ make_reporter(svn_ra_session_t *session,
      regular filesystem path. */
   if (other_url)
     {
+      size_t repos_url_len;
+
       other_url = svn_path_uri_decode(other_url, pool);
       repos_url_decoded = svn_path_uri_decode(sess->repos_url, pool);
       repos_url_len = strlen(repos_url_decoded);
@@ -504,7 +505,8 @@ svn_ra_local__reparent(svn_ra_session_t 
 
   /* Update our FS_PATH sess member to point to our new
      relative-URL-turned-absolute-filesystem-path. */
-  relpath = apr_pstrcat(pool, "/", svn_path_uri_decode(relpath, pool), NULL);
+  relpath = apr_pstrcat(pool, "/", svn_path_uri_decode(relpath, pool),
+                        (char *)NULL);
   svn_stringbuf_set(sess->fs_path, relpath);
 
   return SVN_NO_ERROR;
@@ -871,13 +873,14 @@ svn_ra_local__get_log(svn_ra_session_t *
                       apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *sess = session->priv;
-  int i;
   struct log_baton lb;
   apr_array_header_t *abs_paths =
     apr_array_make(pool, 0, sizeof(const char *));
 
   if (paths)
     {
+      int i;
+
       for (i = 0; i < paths->nelts; i++)
         {
           const char *relative_path = APR_ARRAY_IDX(paths, i, const char *);

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/commit.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/commit.c Fri Oct  8 20:13:26 2010
@@ -49,33 +49,27 @@
 
 
 #define APPLY_TO_VERSION "<D:apply-to-version/>"
+
 /*
-** version_rsrc_t: identify the relevant pieces of a resource on the server
-**
-** REVISION is the resource's revision, or SVN_INVALID_REVNUM if it is
-** new or is the HEAD.
-**
-** URL refers to the public/viewable/original resource.
-** VSN_URL refers to the version resource that we stored locally
-** WR_URL refers to a working resource for this resource
-**
-** Note that VSN_URL is NULL if this resource has just been added, and
-** WR_URL can be NULL if the resource has not (yet) been checked out.
-**
-** LOCAL_PATH is relative to the root of the commit. It will be used
-** for the get_func, push_func, and close_func callbacks.
-**
-** NAME is the name of the resource.
-*/
+ * version_rsrc_t: identify the relevant pieces of a resource on the server
+ *
+ * NOTE:  If you tweak this structure, please update dup_resource() to
+ * ensure that it continues to create complete deep copies!
+ */
 typedef struct
 {
-  svn_revnum_t revision;
-  const char *url;
-  const char *vsn_url;
-  const char *wr_url;
-  const char *local_path;
-  const char *name;
-  apr_pool_t *pool; /* pool in which this resource is allocated. */
+  svn_revnum_t revision;  /* resource's revision, or SVN_INVALID_REVNUM
+                             if it's new or is the HEAD */
+  const char *url;        /* public/viewable/original resource URL */
+  const char *vsn_url;    /* version resource URL that we stored
+                             locally; NULL if this is a just-added resource */
+  const char *wr_url;     /* working resource URL for this resource;
+                             NULL for resources not (yet) checked out */
+  const char *local_path; /* path relative to the root of the commit
+                             (used for get_func, push_func, and
+                             close_func callbacks). */
+  const char *name;       /* basename of the resource */
+  apr_pool_t *pool;       /* pool in which this resource is allocated */
 
 } version_rsrc_t;
 
@@ -141,11 +135,10 @@ static const ne_propname fetch_props[] =
 
 static const ne_propname log_message_prop = { SVN_DAV_PROP_NS_SVN, "log" };
 
-/* perform a deep copy of BASE into POOL, and return the result. */
+/* Return a deep copy of BASE allocated from POOL. */
 static version_rsrc_t * dup_resource(version_rsrc_t *base, apr_pool_t *pool)
 {
   version_rsrc_t *rsrc = apr_pcalloc(pool, sizeof(*rsrc));
-  rsrc->pool = pool;
   rsrc->revision = base->revision;
   rsrc->url = base->url ?
     apr_pstrdup(pool, base->url) : NULL;
@@ -155,6 +148,9 @@ static version_rsrc_t * dup_resource(ver
     apr_pstrdup(pool, base->wr_url) : NULL;
   rsrc->local_path = base->local_path ?
     apr_pstrdup(pool, base->local_path) : NULL;
+  rsrc->name = base->name ?
+    apr_pstrdup(pool, base->name) : NULL;
+  rsrc->pool = pool;
   return rsrc;
 }
 
@@ -701,7 +697,7 @@ static svn_error_t * commit_delete_entry
                                          apr_pool_t *pool)
 {
   resource_baton_t *parent = parent_baton;
-  const char *name = svn_relpath_basename(path, pool);
+  const char *name = svn_relpath_basename(path, NULL);
   apr_hash_t *extra_headers = NULL;
   const char *child;
   int code;

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/fetch.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/fetch.c Fri Oct  8 20:13:26 2010
@@ -56,17 +56,6 @@
 
 
 typedef struct {
-  /* the information for this subdir. if rsrc==NULL, then this is a sentinel
-     record in fetch_ctx_t.subdirs to close the directory implied by the
-     parent_baton member. */
-  svn_ra_neon__resource_t *rsrc;
-
-  /* the directory containing this subdirectory. */
-  void *parent_baton;
-
-} subdir_t;
-
-typedef struct {
   apr_pool_t *pool;
 
   /* these two are the handler that the editor gave us */
@@ -92,9 +81,6 @@ typedef struct {
   void *subctx;
 } custom_get_ctx_t;
 
-#define POP_SUBDIR(sds) (APR_ARRAY_IDX((sds), --(sds)->nelts, subdir_t *))
-#define PUSH_SUBDIR(sds,s) (APR_ARRAY_PUSH((sds), subdir_t *) = (s))
-
 typedef svn_error_t * (*prop_setter_t)(void *baton,
                                        const char *name,
                                        const svn_string_t *value,
@@ -346,7 +332,7 @@ static svn_error_t *add_props(apr_hash_t
              server, or both.  Convert the URI namespace into normal
              'svn:' prefix again before pushing it at the wc. */
           SVN_ERR((*setter)(baton, apr_pstrcat(pool, SVN_PROP_PREFIX,
-                                               key + NSLEN, NULL),
+                                               key + NSLEN, (char *)NULL),
                             val, pool));
         }
 #undef NSLEN
@@ -640,7 +626,8 @@ filter_props(apr_hash_t *props,
       if (strncmp(name, SVN_DAV_PROP_NS_SVN, NSLEN) == 0)
         {
           apr_hash_set(props,
-                       apr_pstrcat(pool, SVN_PROP_PREFIX, name + NSLEN, NULL),
+                       apr_pstrcat(pool, SVN_PROP_PREFIX, name + NSLEN,
+                                   (char *)NULL),
                        APR_HASH_KEY_STRING,
                        value);
           continue;
@@ -2258,7 +2245,8 @@ end_element(void *userdata, int state,
           rb->file_baton ? rb->file_pool : TOP_DIR(rb).pool;
         prop_setter_t setter =
           rb->file_baton ? editor->change_file_prop : editor->change_dir_prop;
-        const char *name = apr_pstrcat(pool, elm->nspace, elm->name, NULL);
+        const char *name = apr_pstrcat(pool, elm->nspace, elm->name,
+                                       (char *)NULL);
         void *baton = rb->file_baton ? rb->file_baton : TOP_DIR(rb).baton;
         svn_string_t valstr;
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/get_locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/get_locks.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/get_locks.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/get_locks.c Fri Oct  8 20:13:26 2010
@@ -379,7 +379,7 @@ svn_ra_neon__get_locks(svn_ra_session_t 
                                                  url, pool));
 
   baton.lock_hash = apr_hash_make(pool);
-  baton.path = apr_pstrcat(pool, "/", rel_path, NULL);
+  baton.path = apr_pstrcat(pool, "/", rel_path, (char *)NULL);
   baton.requested_depth = depth;
   baton.pool = pool;
   baton.scratchpool = svn_pool_create(pool);

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/lock.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/lock.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/lock.c Fri Oct  8 20:13:26 2010
@@ -282,7 +282,7 @@ do_lock(svn_lock_t **lock,
                            "<D:owner>",
                            apr_xml_quote_string(pool, comment, 0),
                            "</D:owner>",
-                           NULL)
+                           (char *)NULL)
              : "");
 
   extra_headers = apr_hash_make(req->pool);

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/mergeinfo.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/mergeinfo.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/mergeinfo.c Fri Oct  8 20:13:26 2010
@@ -166,7 +166,7 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
                            svn_boolean_t include_descendants,
                            apr_pool_t *pool)
 {
-  int i, status_code;
+  int status_code;
   svn_ra_neon__session_t *ras = session->priv;
   svn_stringbuf_t *request_body = svn_stringbuf_create("", pool);
   struct mergeinfo_baton mb;
@@ -204,6 +204,8 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
 
   if (paths)
     {
+      int i;
+
       for (i = 0; i < paths->nelts; i++)
         {
           const char *this_path =

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/props.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/props.c Fri Oct  8 20:13:26 2010
@@ -441,7 +441,7 @@ static svn_error_t * end_element(void *b
 
       if (state == ELEM_unknown)
         {
-          name = apr_pstrcat(pc->pool, nspace, name, NULL);
+          name = apr_pstrcat(pc->pool, nspace, name, (char *)NULL);
         }
       else
         {
@@ -529,7 +529,8 @@ svn_error_t * svn_ra_neon__get_props(apr
           svn_pool_clear(iterpool);
           svn_stringbuf_appendcstr
             (body, apr_pstrcat(iterpool, "<", which_props[n].name, " xmlns=\"",
-                               which_props[n].nspace, "\"/>" DEBUG_CR, NULL));
+                               which_props[n].nspace, "\"/>" DEBUG_CR,
+                               (char *)NULL));
         }
       svn_stringbuf_appendcstr(body, "</prop></propfind>" DEBUG_CR);
       svn_pool_destroy(iterpool);
@@ -626,7 +627,7 @@ svn_error_t * svn_ra_neon__get_one_prop(
   SVN_ERR(svn_ra_neon__get_props_resource(&rsrc, sess, url, label, props,
                                           pool));
 
-  name = apr_pstrcat(pool, propname->nspace, propname->name, NULL);
+  name = apr_pstrcat(pool, propname->nspace, propname->name, (char *)NULL);
   value = apr_hash_get(rsrc->propset, name, APR_HASH_KEY_STRING);
   if (value == NULL)
     {
@@ -1088,12 +1089,12 @@ append_setprop(svn_stringbuf_t *body,
 #define NSLEN (sizeof(SVN_PROP_PREFIX) - 1)
   if (strncmp(name, SVN_PROP_PREFIX, NSLEN) == 0)
     {
-      xml_tag_name = apr_pstrcat(pool, "S:", name + NSLEN, NULL);
+      xml_tag_name = apr_pstrcat(pool, "S:", name + NSLEN, (char *)NULL);
     }
 #undef NSLEN
   else
     {
-      xml_tag_name = apr_pstrcat(pool, "C:", name, NULL);
+      xml_tag_name = apr_pstrcat(pool, "C:", name, (char *)NULL);
     }
 
   if (old_value_p)

Modified: subversion/branches/object-model/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_neon/session.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_neon/session.c Fri Oct  8 20:13:26 2010
@@ -799,7 +799,8 @@ svn_ra_neon__open(svn_ra_session_t *sess
     callbacks->get_client_string(callback_baton, &client_string, pool);
 
   if (client_string)
-    useragent = apr_pstrcat(pool, "SVN/" SVN_VERSION "/", client_string, NULL);
+    useragent = apr_pstrcat(pool, "SVN/" SVN_VERSION "/", client_string,
+                            (char *)NULL);
   else
     useragent = "SVN/" SVN_VERSION;
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/commit.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/commit.c Fri Oct  8 20:13:26 2010
@@ -380,7 +380,7 @@ checkout_dir(dir_context_t *dir)
           dir->checkout->activity_url_len = dir->commit->activity_url_len;
           dir->checkout->resource_url =
             svn_path_url_add_component2(dir->parent_dir->checkout->resource_url,
-                                        svn_relpath_basename(dir->name, dir->pool),
+                                        svn_relpath_basename(dir->name, NULL),
                                         dir->pool);
 
           apr_hash_set(dir->commit->copied_entries,
@@ -749,9 +749,9 @@ proppatch_walker(void *baton,
   /* Use the namespace prefix instead of adding the xmlns attribute to support
      property names containing ':' */
   if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
-    prop_name = apr_pstrcat(pool, "S:", name, NULL);
+    prop_name = apr_pstrcat(pool, "S:", name, (char *)NULL);
   else if (strcmp(ns, SVN_DAV_PROP_NS_CUSTOM) == 0)
-    prop_name = apr_pstrcat(pool, "C:", name, NULL);
+    prop_name = apr_pstrcat(pool, "C:", name, (char *)NULL);
   name_len = strlen(prop_name);
 
   SVN_ERR(derive_old_val(&old_val_p, wb, ns, name, pool));
@@ -860,7 +860,7 @@ setup_proppatch_headers(serf_bucket_t *h
         {
           const char *token_header;
 
-          token_header = apr_pstrcat(pool, "(<", token, ">)", NULL);
+          token_header = apr_pstrcat(pool, "(<", token, ">)", (char *)NULL);
 
           serf_bucket_headers_set(headers, "If", token_header);
         }
@@ -1063,7 +1063,7 @@ setup_put_headers(serf_bucket_t *headers
         {
           const char *token_header;
 
-          token_header = apr_pstrcat(pool, "(<", token, ">)", NULL);
+          token_header = apr_pstrcat(pool, "(<", token, ">)", (char *)NULL);
 
           serf_bucket_headers_set(headers, "If", token_header);
         }
@@ -1158,7 +1158,7 @@ setup_delete_headers(serf_bucket_t *head
           const char *token_header;
 
           token_header = apr_pstrcat(pool, "<", ctx->path, "> (<",
-                                     ctx->lock_token, ">)", NULL);
+                                     ctx->lock_token, ">)", (char *)NULL);
 
           serf_bucket_headers_set(headers, "If", token_header);
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/getlocks.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/getlocks.c Fri Oct  8 20:13:26 2010
@@ -336,7 +336,7 @@ svn_ra_serf__get_locks(svn_ra_session_t 
 
   lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx));
   lock_ctx->pool = pool;
-  lock_ctx->path = apr_pstrcat(pool, "/", rel_path, NULL);
+  lock_ctx->path = apr_pstrcat(pool, "/", rel_path, (char *)NULL);
   lock_ctx->requested_depth = depth;
   lock_ctx->hash = apr_hash_make(pool);
   lock_ctx->done = FALSE;

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/locks.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/locks.c Fri Oct  8 20:13:26 2010
@@ -732,7 +732,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
         }
 
       unlock_ctx.force = force;
-      unlock_ctx.token = apr_pstrcat(subpool, "<", token, ">", NULL);
+      unlock_ctx.token = apr_pstrcat(subpool, "<", token, ">", (char *)NULL);
 
       req_url = svn_path_url_add_component2(session->repos_url.path, path,
                                             subpool);

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/mergeinfo.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/mergeinfo.c Fri Oct  8 20:13:26 2010
@@ -184,7 +184,6 @@ create_mergeinfo_body(serf_bucket_t **bk
 {
   mergeinfo_context_t *mergeinfo_ctx = baton;
   serf_bucket_t *body_bkt;
-  int i;
 
   body_bkt = serf_bucket_aggregate_create(alloc);
 
@@ -209,6 +208,8 @@ create_mergeinfo_body(serf_bucket_t **bk
 
   if (mergeinfo_ctx->paths)
     {
+      int i;
+
       for (i = 0; i < mergeinfo_ctx->paths->nelts; i++)
         {
           const char *this_path = APR_ARRAY_IDX(mergeinfo_ctx->paths,

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/property.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/property.c Fri Oct  8 20:13:26 2010
@@ -862,9 +862,9 @@ set_bare_props(svn_ra_serf__prop_set_t s
   if (strcmp(ns, SVN_DAV_PROP_NS_CUSTOM) == 0)
     prop_name = name;
   else if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
-    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, NULL);
+    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, (char *)NULL);
   else if (strcmp(ns, SVN_PROP_PREFIX) == 0)
-    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, NULL);
+    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, (char *)NULL);
   else if (strcmp(ns, "") == 0)
     prop_name = name;
   else
@@ -888,9 +888,9 @@ svn_ra_serf__set_baton_props(svn_ra_serf
   if (strcmp(ns, SVN_DAV_PROP_NS_CUSTOM) == 0)
     prop_name = name;
   else if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
-    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, NULL);
+    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, (char *)NULL);
   else if (strcmp(ns, SVN_PROP_PREFIX) == 0)
-    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, NULL);
+    prop_name = apr_pstrcat(pool, SVN_PROP_PREFIX, name, (char *)NULL);
   else if (strcmp(ns, "") == 0)
     prop_name = name;
   else if (strcmp(name, SVN_DAV__VERSION_NAME) == 0)
@@ -915,7 +915,7 @@ svn_ra_serf__set_baton_props(svn_ra_serf
   else
     {
       /* An unknown namespace, must be a custom property. */
-      prop_name = apr_pstrcat(pool, ns, name, NULL);
+      prop_name = apr_pstrcat(pool, ns, name, (char *)NULL);
     }
 
   return setprop(baton, prop_name, val, pool);

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/serf.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/serf.c Fri Oct  8 20:13:26 2010
@@ -433,7 +433,7 @@ svn_ra_serf__open(svn_ra_session_t *sess
 
   if (client_string)
     serf_sess->conns[0]->useragent = apr_pstrcat(pool, USER_AGENT, "/",
-                                                 client_string, NULL);
+                                                 client_string, (char *)NULL);
   else
     serf_sess->conns[0]->useragent = USER_AGENT;
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/update.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/update.c Fri Oct  8 20:13:26 2010
@@ -2135,7 +2135,7 @@ link_path(void *report_baton,
   SVN_ERR(svn_ra_serf__get_relative_path(&link, uri.path, report->sess,
                                          NULL, pool));
 
-  link = apr_pstrcat(pool, "/", link, NULL);
+  link = apr_pstrcat(pool, "/", link, (char *)NULL);
 
   svn_xml_make_open_tag(&buf, pool, svn_xml_protect_pcdata, "S:entry",
                         "rev", apr_ltoa(pool, revision),

Modified: subversion/branches/object-model/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_svn/client.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_svn/client.c Fri Oct  8 20:13:26 2010
@@ -2291,7 +2291,7 @@ static svn_error_t *ra_svn_get_locks(svn
   /* Figure out the repository abspath from PATH. */
   abs_path = svn_path_url_add_component2(sess->url, path, pool);
   SVN_ERR(path_relative_to_root(session, &abs_path, abs_path, pool));
-  abs_path = apr_pstrcat(pool, "/", abs_path, NULL);
+  abs_path = apr_pstrcat(pool, "/", abs_path, (char *)NULL);
 
   SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "get-locks", "c(w)", path,
                                svn_depth_to_word(depth)));

Modified: subversion/branches/object-model/subversion/libsvn_ra_svn/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_svn/cyrus_auth.c Fri Oct  8 20:13:26 2010
@@ -410,7 +410,7 @@ static svn_error_t *try_auth(svn_ra_svn_
                                               pmech - mechstring);
               const char *tail = pmech + strlen(mech);
 
-              mechstring = apr_pstrcat(pool, head, tail, NULL);
+              mechstring = apr_pstrcat(pool, head, tail, (char *)NULL);
               again = TRUE;
             }
         }
@@ -632,10 +632,11 @@ svn_error_t *svn_ra_svn__enable_sasl_enc
                                                 apr_pool_t *pool)
 {
   const sasl_ssf_t *ssfp;
-  int result;
 
   if (! conn->encrypted)
     {
+      int result;
+
       /* Get the strength of the security layer. */
       result = sasl_getprop(sasl_ctx, SASL_SSF, (void*) &ssfp);
       if (result != SASL_OK)
@@ -718,9 +719,11 @@ svn_error_t *svn_ra_svn__get_addresses(c
 
       /* Format the IP address and port number like this: a.b.c.d;port */
       *local_addrport = apr_pstrcat(pool, local_addr, ";",
-                                    apr_itoa(pool, (int)local_sa->port), NULL);
+                                    apr_itoa(pool, (int)local_sa->port),
+                                    (char *)NULL);
       *remote_addrport = apr_pstrcat(pool, remote_addr, ";",
-                                     apr_itoa(pool, (int)remote_sa->port), NULL);
+                                     apr_itoa(pool, (int)remote_sa->port),
+                                     (char *)NULL);
     }
   return SVN_NO_ERROR;
 }
@@ -761,7 +764,7 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
           mechstring = apr_pstrcat(pool,
                                    mechstring,
                                    i == 0 ? "" : " ",
-                                   elt->u.word, NULL);
+                                   elt->u.word, (char *)NULL);
         }
     }
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_svn/marshal.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_svn/marshal.c Fri Oct  8 20:13:26 2010
@@ -582,7 +582,7 @@ static svn_error_t *read_item(svn_ra_svn
                               int level)
 {
   char c = first_char;
-  apr_uint64_t val, prev_val=0;
+  apr_uint64_t val;
   svn_stringbuf_t *str;
   svn_ra_svn_item_t *listitem;
 
@@ -600,7 +600,7 @@ static svn_error_t *read_item(svn_ra_svn
       val = c - '0';
       while (1)
         {
-          prev_val = val;
+          apr_uint64_t prev_val = val;
           SVN_ERR(readbuf_getchar(conn, pool, &c));
           if (!svn_ctype_isdigit(c))
             break;

Modified: subversion/branches/object-model/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_svn/protocol?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_svn/protocol Fri Oct  8 20:13:26 2010
@@ -199,7 +199,7 @@ capability and C indicates a client capa
 [S]  depth             If the server presents this capability, it understands
                        requested operational depth (see section 3.1.1) and
                        per-path ambient depth (see section 3.1.3).
-[S]  atomic-revprops   If the server presents support this capability, it
+[S]  atomic-revprops   If the server presents this capability, it
                        supports the change-rev-prop2 command.
                        See section 3.1.1.
 

Modified: subversion/branches/object-model/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/authz.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/authz.c Fri Oct  8 20:13:26 2010
@@ -333,7 +333,7 @@ authz_get_path_access(svn_config_t *cfg,
   baton.user = user;
 
   /* Try to locate a repository-specific block first. */
-  qualified_path = apr_pstrcat(pool, repos_name, ":", path, NULL);
+  qualified_path = apr_pstrcat(pool, repos_name, ":", path, (char *)NULL);
   svn_config_enumerate2(cfg, qualified_path,
                         authz_parse_line, &baton, pool);
 
@@ -376,7 +376,7 @@ authz_get_tree_access(svn_config_t *cfg,
   baton.required_access = required_access;
   baton.repos_path = path;
   baton.qualified_repos_path = apr_pstrcat(pool, repos_name,
-                                           ":", path, NULL);
+                                           ":", path, (char *)NULL);
   /* Default to access granted if no rules say otherwise. */
   baton.access = TRUE;
 
@@ -433,7 +433,7 @@ authz_get_global_access(svn_config_t *cf
   baton.user = user;
   baton.required_access = required_access;
   baton.access = FALSE; /* Deny access by default. */
-  baton.repos_path = apr_pstrcat(pool, repos_name, ":/", NULL);
+  baton.repos_path = apr_pstrcat(pool, repos_name, ":/", (char *)NULL);
 
   svn_config_enumerate_sections2(cfg, authz_global_parse_section,
                                  &baton, pool);

Modified: subversion/branches/object-model/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/delta.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/delta.c Fri Oct  8 20:13:26 2010
@@ -965,7 +965,6 @@ delta_dirs(struct context *c,
          entries hash? */
       if (s_entries && ((s_entry = apr_hash_get(s_entries, key, klen)) != 0))
         {
-          int distance;
           svn_node_kind_t src_kind;
 
           s_fullpath = svn_path_join(source_path, t_entry->name, subpool);
@@ -984,7 +983,7 @@ delta_dirs(struct context *c,
                        old one and add the new one.
                     1: means the nodes are related through ancestry, so go
                        ahead and do the replace directly.  */
-              distance = svn_fs_compare_ids(s_entry->id, t_entry->id);
+              int distance = svn_fs_compare_ids(s_entry->id, t_entry->id);
               if (distance == 0)
                 {
                   /* no-op */

Modified: subversion/branches/object-model/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/dump.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/dump.c Fri Oct  8 20:13:26 2010
@@ -432,7 +432,7 @@ dump_node(struct edit_baton *eb,
       /* If this is a partial dump, then issue a warning if we dump mergeinfo
          properties that refer to revisions older than the first revision
          dumped. */
-      if (eb->notify_func && eb->oldest_dumped_rev > 1)
+      if (!eb->verify && eb->notify_func && eb->oldest_dumped_rev > 1)
         {
           svn_string_t *mergeinfo_str = apr_hash_get(prophash,
                                                      SVN_PROP_MERGEINFO,

Modified: subversion/branches/object-model/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/fs-wrap.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/fs-wrap.c Fri Oct  8 20:13:26 2010
@@ -276,7 +276,6 @@ svn_repos_fs_change_rev_prop4(svn_repos_
                               apr_pool_t *pool)
 {
   svn_repos_revision_access_level_t readability;
-  char action;
 
   SVN_ERR(svn_repos_check_revision_access(&readability, repos, rev,
                                           authz_read_func, authz_read_baton,
@@ -285,6 +284,7 @@ svn_repos_fs_change_rev_prop4(svn_repos_
   if (readability == svn_repos_revision_access_full)
     {
       const svn_string_t *old_value;
+      char action;
 
       SVN_ERR(validate_prop(name, new_value, pool));
 
@@ -612,7 +612,6 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
   apr_array_header_t *readable_paths = (apr_array_header_t *) paths;
   svn_fs_root_t *root;
   apr_pool_t *iterpool = svn_pool_create(pool);
-  int i;
 
   if (!SVN_IS_VALID_REVNUM(rev))
     SVN_ERR(svn_fs_youngest_rev(&rev, repos->fs, pool));
@@ -621,6 +620,8 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
   /* Filter out unreadable paths before divining merge tracking info. */
   if (authz_read_func)
     {
+      int i;
+
       for (i = 0; i < paths->nelts; i++)
         {
           svn_boolean_t readable;

Modified: subversion/branches/object-model/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/hooks.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/hooks.c Fri Oct  8 20:13:26 2010
@@ -347,7 +347,7 @@ check_hook_cmd(const char *hook, svn_boo
   for (extn = check_extns; *extn; ++extn)
     {
       const char *const hook_path =
-        (**extn ? apr_pstrcat(pool, hook, *extn, NULL) : hook);
+        (**extn ? apr_pstrcat(pool, hook, *extn, (char *)NULL) : hook);
 
       svn_node_kind_t kind;
       if (!(err = svn_io_check_resolved_path(hook_path, &kind, pool))

Modified: subversion/branches/object-model/subversion/libsvn_repos/node_tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/node_tree.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/node_tree.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/node_tree.c Fri Oct  8 20:13:26 2010
@@ -268,7 +268,7 @@ add_open_helper(const char *path,
   nb->parent_baton = pb;
 
   /* Create and populate the node. */
-  nb->node = create_child_node(pb->node, svn_relpath_basename(path, pool),
+  nb->node = create_child_node(pb->node, svn_relpath_basename(path, NULL),
                                eb->node_pool);
   nb->node->kind = kind;
   nb->node->action = action;

Modified: subversion/branches/object-model/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/replay.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/replay.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/replay.c Fri Oct  8 20:13:26 2010
@@ -248,7 +248,8 @@ add_subdir(svn_fs_root_t *source_root,
           if (copyfrom_path)
             {
               svn_fs_t *fs = svn_fs_root_fs(source_root);
-              SVN_ERR(svn_fs_revision_root(&new_source_root, fs, copyfrom_rev, pool));
+              SVN_ERR(svn_fs_revision_root(&new_source_root, fs, copyfrom_rev,
+                                           pool));
               new_source_path = copyfrom_path;
             }
           else

Modified: subversion/branches/object-model/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/reporter.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/reporter.c Fri Oct  8 20:13:26 2010
@@ -680,7 +680,7 @@ add_file_smartly(report_baton_t *b,
          starting with '/', so make sure o_path always starts with a '/'
          too. */
       if (*o_path != '/')
-        o_path = apr_pstrcat(pool, "/", o_path, NULL);
+        o_path = apr_pstrcat(pool, "/", o_path, (char *)NULL);
 
       SVN_ERR(svn_fs_closest_copy(&closest_copy_root, &closest_copy_path,
                                   b->t_root, o_path, pool));
@@ -760,7 +760,6 @@ update_entry(report_baton_t *b, svn_revn
   void *new_baton;
   svn_checksum_t *checksum;
   const char *hex_digest;
-  int distance;
 
   /* For non-switch operations, follow link_path in the target. */
   if (info && info->link_path && !b->is_switch)
@@ -798,7 +797,7 @@ update_entry(report_baton_t *b, svn_revn
   related = FALSE;
   if (s_entry && t_entry && s_entry->kind == t_entry->kind)
     {
-      distance = svn_fs_compare_ids(s_entry->id, t_entry->id);
+      int distance = svn_fs_compare_ids(s_entry->id, t_entry->id);
       if (distance == 0 && !any_path_info(b, e_path)
           && (!info || (!info->start_empty && !info->lock_token))
           && (requested_depth <= wc_depth || t_entry->kind == svn_node_file))

Modified: subversion/branches/object-model/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_repos/rev_hunt.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/object-model/subversion/libsvn_repos/rev_hunt.c Fri Oct  8 20:13:26 2010
@@ -659,7 +659,7 @@ svn_repos_trace_node_locations(svn_fs_t 
   /* Ensure that FS_PATH is absolute, because our path-math below will
      depend on that being the case.  */
   if (*fs_path != '/')
-    fs_path = apr_pstrcat(pool, "/", fs_path, NULL);
+    fs_path = apr_pstrcat(pool, "/", fs_path, (char *)NULL);
 
   /* Another sanity check. */
   if (authz_read_func)
@@ -873,7 +873,7 @@ svn_repos_node_location_segments(svn_rep
   /* Ensure that PATH is absolute, because our path-math will depend
      on that being the case.  */
   if (*path != '/')
-    path = apr_pstrcat(pool, "/", path, NULL);
+    path = apr_pstrcat(pool, "/", path, (char *)NULL);
 
   /* Auth check. */
   if (authz_read_func)
@@ -937,7 +937,7 @@ svn_repos_node_location_segments(svn_rep
 
           /* authz_read_func requires path to have a leading slash. */
           const char *abs_path = apr_pstrcat(subpool, "/", segment->path,
-                                             NULL);
+                                             (char *)NULL);
 
           SVN_ERR(svn_fs_revision_root(&cur_rev_root, fs,
                                        segment->range_end, subpool));

Modified: subversion/branches/object-model/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/auth.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/auth.c Fri Oct  8 20:13:26 2010
@@ -187,7 +187,7 @@ svn_auth_first_credentials(void **creden
                              cred_kind);
 
   /* First, see if we have cached creds in the auth_baton. */
-  cache_key = apr_pstrcat(pool, cred_kind, ":", realmstring, NULL);
+  cache_key = apr_pstrcat(pool, cred_kind, ":", realmstring, (char *)NULL);
   creds = apr_hash_get(auth_baton->creds_cache,
                        cache_key, APR_HASH_KEY_STRING);
   if (creds)

Modified: subversion/branches/object-model/subversion/libsvn_subr/cache-memcache.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/cache-memcache.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/cache-memcache.c Fri Oct  8 20:13:26 2010
@@ -97,7 +97,7 @@ build_key(memcache_t *cache,
     }
 
   long_key = apr_pstrcat(pool, "SVN:", cache->prefix, ":", encoded_suffix,
-                         NULL);
+                         (char *)NULL);
   long_key_len = strlen(long_key);
 
   /* We don't want to have a key that's too big.  If it was going to
@@ -117,7 +117,7 @@ build_key(memcache_t *cache,
                              apr_pstrmemdup(pool, long_key,
                                             MEMCACHED_KEY_UNHASHED_LEN),
                              svn_checksum_to_cstring_display(checksum, pool),
-                             NULL);
+                             (char *)NULL);
     }
 
   return long_key;

Modified: subversion/branches/object-model/subversion/libsvn_subr/checksum.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/checksum.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/checksum.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/checksum.c Fri Oct  8 20:13:26 2010
@@ -159,7 +159,7 @@ svn_checksum_serialize(const svn_checksu
   return apr_pstrcat(result_pool,
                      ckind_str,
                      svn_checksum_to_cstring(checksum, scratch_pool),
-                     NULL);
+                     (char *)NULL);
 }
 
 

Modified: subversion/branches/object-model/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/deprecated.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/deprecated.c Fri Oct  8 20:13:26 2010
@@ -549,17 +549,20 @@ svn_opt_print_help(apr_getopt_t *os,
                    apr_pool_t *pool)
 {
   apr_array_header_t *targets = NULL;
-  int i;
 
   if (os)
     SVN_ERR(svn_opt_parse_all_args(&targets, os, pool));
 
   if (os && targets->nelts)  /* help on subcommand(s) requested */
-    for (i = 0; i < targets->nelts; i++)
-      {
-        svn_opt_subcommand_help(APR_ARRAY_IDX(targets, i, const char *),
-                                cmd_table, option_table, pool);
-      }
+    {
+      int i;
+
+      for (i = 0; i < targets->nelts; i++)
+        {
+          svn_opt_subcommand_help(APR_ARRAY_IDX(targets, i, const char *),
+                                  cmd_table, option_table, pool);
+        }
+    }
   else if (print_version)   /* just --version */
     SVN_ERR(svn_opt__print_version_info(pgm_name, version_footer, quiet,
                                         pool));

Modified: subversion/branches/object-model/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/dirent_uri.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/dirent_uri.c Fri Oct  8 20:13:26 2010
@@ -1936,10 +1936,9 @@ svn_dirent_condense_targets(const char *
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool)
 {
-  int i, j, num_condensed = targets->nelts;
+  int i, num_condensed = targets->nelts;
   svn_boolean_t *removed;
   apr_array_header_t *abs_targets;
-  size_t basedir_len;
 
   /* Early exit when there's no data to work on. */
   if (targets->nelts <= 0)
@@ -1995,6 +1994,8 @@ svn_dirent_condense_targets(const char *
 
   if (pcondensed_targets != NULL)
     {
+      size_t basedir_len;
+
       if (remove_redundancies)
         {
           /* Find the common part of each pair of targets.  If
@@ -2006,6 +2007,8 @@ svn_dirent_condense_targets(const char *
              another non-removed target, remove the child. */
           for (i = 0; i < abs_targets->nelts; ++i)
             {
+              int j;
+
               if (removed[i])
                 continue;
 
@@ -2101,10 +2104,9 @@ svn_uri_condense_targets(const char **pc
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool)
 {
-  int i, j, num_condensed = targets->nelts;
+  int i, num_condensed = targets->nelts;
   apr_array_header_t *uri_targets;
   svn_boolean_t *removed;
-  size_t basedir_len;
 
   /* Early exit when there's no data to work on. */
   if (targets->nelts <= 0)
@@ -2156,6 +2158,8 @@ svn_uri_condense_targets(const char **pc
 
   if (pcondensed_targets != NULL)
     {
+      size_t basedir_len;
+
       if (remove_redundancies)
         {
           /* Find the common part of each pair of targets.  If
@@ -2167,6 +2171,8 @@ svn_uri_condense_targets(const char **pc
              another non-removed target, remove the child. */
           for (i = 0; i < uri_targets->nelts; ++i)
             {
+              int j;
+
               if (removed[i])
                 continue;
 
@@ -2423,7 +2429,7 @@ svn_uri_get_file_url_from_dirent(const c
   dirent = svn_path_uri_encode(dirent, pool);
 
 #ifndef SVN_USE_DOS_PATHS
-  *url = apr_pstrcat(pool, "file://", dirent, NULL);
+  *url = apr_pstrcat(pool, "file://", dirent, (char *)NULL);
 #else
   if (dirent[0] == '/')
     {

Modified: subversion/branches/object-model/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/error.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/error.c Fri Oct  8 20:13:26 2010
@@ -485,11 +485,12 @@ svn_handle_error2(svn_error_t *err,
   tmp_err = err;
   while (tmp_err)
     {
-      int i;
       svn_boolean_t printed_already = FALSE;
 
       if (! tmp_err->message)
         {
+          int i;
+
           for (i = 0; i < empties->nelts; i++)
             {
               if (tmp_err->apr_err == APR_ARRAY_IDX(empties, i, apr_status_t) )

Modified: subversion/branches/object-model/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/io.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/io.c Fri Oct  8 20:13:26 2010
@@ -1268,30 +1268,46 @@ reown_file(const char *path,
 static svn_error_t *
 get_default_file_perms(apr_fileperms_t *perms, apr_pool_t *scratch_pool)
 {
-  apr_finfo_t finfo;
-  apr_file_t *fd;
+  /* the default permissions as read from the temp folder */
+  static apr_fileperms_t default_perms = 0;
+
+  /* Technically, this "racy": Multiple threads may use enter here and
+     try to figure out the default permisission concurrently. That's fine
+     since they will end up with the same results. Even more technical,
+     apr_fileperms_t is an atomic type on 32+ bit machines.
+   */
+  if (default_perms == 0)
+    {
+      apr_finfo_t finfo;
+      apr_file_t *fd;
 
-  /* Get the perms for a newly created file to find out what bits
-     should be set.
+      /* Get the perms for a newly created file to find out what bits
+        should be set.
 
-     NOTE: normally del_on_close can be problematic because APR might
-       delete the file if we spawned any child processes. In this case,
-       the lifetime of this file handle is about 3 lines of code, so
-       we can safely use del_on_close here.
-
-     NOTE: not so fast, shorty. if some other thread forks off a child,
-       then the APR cleanups run, and the file will disappear. sigh.
-
-     Using svn_io_open_uniquely_named() here because other tempfile
-     creation functions tweak the permission bits of files they create.
-  */
-  SVN_ERR(svn_io_open_uniquely_named(&fd, NULL, NULL, "svn-tempfile", ".tmp",
-                                     svn_io_file_del_on_pool_cleanup,
-                                     scratch_pool, scratch_pool));
-  SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_PROT, fd, scratch_pool));
-  SVN_ERR(svn_io_file_close(fd, scratch_pool));
+        Normally del_on_close can be problematic because APR might
+        delete the file if we spawned any child processes. In this
+        case, the lifetime of this file handle is about 3 lines of
+        code, so we can safely use del_on_close here.
+
+        Not so fast! If some other thread forks off a child, then the
+        APR cleanups run, and the file will disappear. So use
+        del_on_pool_cleanup instead.
+
+        Using svn_io_open_uniquely_named() here because other tempfile
+        creation functions tweak the permission bits of files they create.
+      */
+      SVN_ERR(svn_io_open_uniquely_named(&fd, NULL, NULL, "svn-tempfile", ".tmp",
+                                        svn_io_file_del_on_pool_cleanup,
+                                        scratch_pool, scratch_pool));
+      SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_PROT, fd, scratch_pool));
+      SVN_ERR(svn_io_file_close(fd, scratch_pool));
+
+      *perms = finfo.protection;
+      default_perms = finfo.protection;
+    }
+  else
+    *perms = default_perms;
 
-  *perms = finfo.protection;
   return SVN_NO_ERROR;
 }
 
@@ -2545,7 +2561,6 @@ svn_io_parse_mimetypes_file(apr_hash_t *
     {
       apr_array_header_t *tokens;
       const char *type;
-      int i;
 
       svn_pool_clear(subpool);
 
@@ -2557,6 +2572,8 @@ svn_io_parse_mimetypes_file(apr_hash_t *
       /* Only pay attention to non-empty, non-comment lines. */
       if (buf->len)
         {
+          int i;
+
           if (buf->data[0] == '#')
             continue;
 

Modified: subversion/branches/object-model/subversion/libsvn_subr/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/log.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/log.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/log.c Fri Oct  8 20:13:26 2010
@@ -45,7 +45,7 @@ log_depth(svn_depth_t depth, apr_pool_t 
 {
   if (depth == svn_depth_unknown)
     return "";
-  return apr_pstrcat(pool, " depth=", svn_depth_to_word(depth), NULL);
+  return apr_pstrcat(pool, " depth=", svn_depth_to_word(depth), (char *)NULL);
 }
 
 static const char *

Modified: subversion/branches/object-model/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/mergeinfo.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/mergeinfo.c Fri Oct  8 20:13:26 2010
@@ -1367,7 +1367,7 @@ svn_mergeinfo_catalog_merge(svn_mergeinf
       change_elt = APR_ARRAY_IDX(sorted_changes, j, svn_sort__item_t);
       res = svn_sort_compare_items_as_paths(&cat_elt, &change_elt);
 
-      if (res == 0) /* Both catalogs have mergeinfo for a give path. */
+      if (res == 0) /* Both catalogs have mergeinfo for a given path. */
         {
           svn_mergeinfo_t mergeinfo = cat_elt.value;
           svn_mergeinfo_t changes_mergeinfo = change_elt.value;

Modified: subversion/branches/object-model/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/opt.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/opt.c Fri Oct  8 20:13:26 2010
@@ -88,18 +88,21 @@ svn_opt_get_option_from_code2(int code,
   for (i = 0; option_table[i].optch; i++)
     if (option_table[i].optch == code)
       {
-        int j;
         if (command)
-          for (j = 0; ((j < SVN_OPT_MAX_OPTIONS) &&
-                       command->desc_overrides[j].optch); j++)
-            if (command->desc_overrides[j].optch == code)
-              {
-                apr_getopt_option_t *tmpopt =
-                    apr_palloc(pool, sizeof(*tmpopt));
-                *tmpopt = option_table[i];
-                tmpopt->description = command->desc_overrides[j].desc;
-                return tmpopt;
-              }
+          {
+            int j;
+
+            for (j = 0; ((j < SVN_OPT_MAX_OPTIONS) &&
+                         command->desc_overrides[j].optch); j++)
+              if (command->desc_overrides[j].optch == code)
+                {
+                  apr_getopt_option_t *tmpopt =
+                      apr_palloc(pool, sizeof(*tmpopt));
+                  *tmpopt = option_table[i];
+                  tmpopt->description = command->desc_overrides[j].desc;
+                  return tmpopt;
+                }
+          }
         return &(option_table[i]);
       }
 
@@ -331,7 +334,7 @@ svn_opt_format_option(const char **strin
     opts = apr_psprintf(pool, "--%s", opt->name);
 
   if (opt->has_arg)
-    opts = apr_pstrcat(pool, opts, _(" ARG"), NULL);
+    opts = apr_pstrcat(pool, opts, _(" ARG"), (char *)NULL);
 
   if (doc)
     opts = apr_psprintf(pool, "%-24s : %s", opts, _(opt->description));
@@ -833,7 +836,7 @@ svn_opt__args_to_target_array(apr_array_
             }
         }
 
-      target = apr_pstrcat(pool, true_target, peg_rev, NULL);
+      target = apr_pstrcat(pool, true_target, peg_rev, (char *)NULL);
 
       APR_ARRAY_PUSH(output_targets, const char *) = target;
     }
@@ -1031,18 +1034,21 @@ svn_opt_print_help3(apr_getopt_t *os,
                     apr_pool_t *pool)
 {
   apr_array_header_t *targets = NULL;
-  int i;
 
   if (os)
     SVN_ERR(svn_opt_parse_all_args(&targets, os, pool));
 
   if (os && targets->nelts)  /* help on subcommand(s) requested */
-    for (i = 0; i < targets->nelts; i++)
-      {
-        svn_opt_subcommand_help3(APR_ARRAY_IDX(targets, i, const char *),
-                                 cmd_table, option_table,
-                                 global_options, pool);
-      }
+    {
+      int i;
+
+      for (i = 0; i < targets->nelts; i++)
+        {
+          svn_opt_subcommand_help3(APR_ARRAY_IDX(targets, i, const char *),
+                                   cmd_table, option_table,
+                                   global_options, pool);
+        }
+    }
   else if (print_version)   /* just --version */
     SVN_ERR(svn_opt__print_version_info(pgm_name, version_footer, quiet,
                                         pool));

Modified: subversion/branches/object-model/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_subr/sqlite.c?rev=1006005&r1=1006004&r2=1006005&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/object-model/subversion/libsvn_subr/sqlite.c Fri Oct  8 20:13:26 2010
@@ -789,7 +789,7 @@ internal_open(sqlite3 **db3, const char 
              error than the close error at this point. */
           sqlite3_close(*db3);
 
-          msg = apr_pstrcat(scratch_pool, msg, ": '", path, "'", NULL);
+          msg = apr_pstrcat(scratch_pool, msg, ": '", path, "'", (char *)NULL);
           return svn_error_create(SQLITE_ERROR_CODE(err_code), NULL, msg);
         }
     }