subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1478055 - in /subversion/branches/fsfs-format7/subversion: libsvn_fs_fs/changes.c libsvn_fs_fs/fs_fs.c libsvn_fs_fs/index.c libsvn_fs_fs/noderevs.c libsvn_fs_fs/pack.c libsvn_fs_fs/string_table.c libsvn_subr/cache-membuffer.c
Date Wed, 01 May 2013 15:41:23 GMT
Author: stefan2
Date: Wed May  1 15:41:22 2013
New Revision: 1478055

URL: http://svn.apache.org/r1478055
Log:
On the fsfs-format7 branch: Fix various compiler warnings.

* subversion/libsvn_fs_fs/changes.c
  (): add missing #include

* subversion/libsvn_fs_fs/fs_fs.c
  (compare_l2p_to_p2l_index): mark non-public functions as static
  (compare_p2l_to_l2p_index,
   verify_rep_cache,
   verify_index_consistency): mark non-public functions as static;
                              remove unused variable
  (svn_fs_fs__verify): remove unused variable

* subversion/libsvn_fs_fs/index.c
  (get_p2l_keys,
   p2l_entry_lookup_func): mark non-public functions as static

* subversion/libsvn_fs_fs/noderevs.c
  (): add missing #include
  (store_id): use properly nested initializer
  (svn_fs_fs__noderevs_add): remove unused variable
  (write_reps): cast unsigned -> signed char strings

* subversion/libsvn_fs_fs/pack.c
  (auto_pad_block,
   copy_items_from_temp,
   write_changes_containers): remove unused variable

* subversion/libsvn_fs_fs/string_table.c
  (svn_fs_fs__string_table_get_func): no mixed declarations

* subversion/libsvn_subr/cache-membuffer.c
  (membuffer_cache_set_partial_internal): remove unused variable

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c
    subversion/branches/fsfs-format7/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/changes.c Wed May  1 15:41:22
2013
@@ -26,6 +26,7 @@
 
 #include "changes.h"
 #include "string_table.h"
+#include "temp_serializer.h"
 
 /* These flags will be used with the FLAGS field in binary_change_t.
  */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c Wed May  1 15:41:22 2013
@@ -1409,7 +1409,7 @@ verify_walker(representation_t *rep,
  * The values of START and END have already been auto-selected and
  * verified.
  */
-svn_error_t *
+static svn_error_t *
 verify_rep_cache(svn_fs_t *fs,
                  svn_revnum_t start,
                  svn_revnum_t end,
@@ -1419,7 +1419,6 @@ verify_rep_cache(svn_fs_t *fs,
                  void *cancel_baton,
                  apr_pool_t *pool)
 {
-  fs_fs_data_t *ffd = fs->fsap_data;
   svn_boolean_t exists;
 
   /* rep-cache verification. */
@@ -1458,7 +1457,7 @@ verify_rep_cache(svn_fs_t *fs,
  * index.  If given, invoke CANCEL_FUNC with CANCEL_BATON at regular
  * intervals. Use POOL for allocations.
  */
-svn_error_t *
+static svn_error_t *
 compare_l2p_to_p2l_index(svn_fs_t *fs,
                          svn_revnum_t start,
                          svn_revnum_t count,
@@ -1535,7 +1534,7 @@ compare_l2p_to_p2l_index(svn_fs_t *fs,
  * Please note that we can only check on pack / rev file granularity and
  * must only be called for a single rev / pack file.
  */
-svn_error_t *
+static svn_error_t *
 compare_p2l_to_l2p_index(svn_fs_t *fs,
                          svn_revnum_t start,
                          svn_revnum_t count,
@@ -1544,7 +1543,6 @@ compare_p2l_to_l2p_index(svn_fs_t *fs,
                          apr_pool_t *pool)
 {
   apr_pool_t *iterpool = svn_pool_create(pool);
-  apr_array_header_t *max_ids;
   apr_off_t max_offset;
   apr_off_t offset = 0;
 
@@ -1565,7 +1563,7 @@ compare_p2l_to_l2p_index(svn_fs_t *fs,
       if (entries->nelts == 0)
         return svn_error_createf(SVN_ERR_FS_ITEM_INDEX_CORRUPTION,
                                  NULL,
-                                 _("p2l does not cover offset " APR_OFF_T_FMT
+                                 _("p2l does not cover offset %" APR_OFF_T_FMT
                                    " for revision %ld"),
                                  offset, start);
 
@@ -1623,7 +1621,7 @@ compare_p2l_to_l2p_index(svn_fs_t *fs,
  * The values of START and END have already been auto-selected and
  * verified.  You may call this for format7 or higher repos.
  */
-svn_error_t *
+static svn_error_t *
 verify_index_consistency(svn_fs_t *fs,
                          svn_revnum_t start,
                          svn_revnum_t end,
@@ -1639,7 +1637,6 @@ verify_index_consistency(svn_fs_t *fs,
 
   for (revision = start; revision <= end; revision = pack_end)
     {
-      apr_array_header_t *max_ids;
       pack_start = packed_base_rev(fs, revision);
       pack_end = pack_start + pack_size(fs, revision);
 
@@ -1671,7 +1668,6 @@ svn_fs_fs__verify(svn_fs_t *fs,
                   apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  svn_boolean_t exists;
   svn_revnum_t youngest = ffd->youngest_rev_cache; /* cache is current */
 
   /* Input validation. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c Wed May  1 15:41:22 2013
@@ -2284,7 +2284,7 @@ get_p2l_keys(p2l_page_info_baton_t *page
 /* Body of svn_fs_fs__p2l_index_lookup.  Use / autoconstruct *STREAM as
  * your input based on REVISION.
  */
-svn_error_t *
+static svn_error_t *
 p2l_index_lookup(apr_array_header_t **entries,
                  packed_number_stream_t **stream,
                  svn_fs_t *fs,
@@ -2455,7 +2455,7 @@ p2l_entry_lookup_func(void **out,
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
+static svn_error_t *
 p2l_entry_lookup(svn_fs_fs__p2l_entry_t **entry_p,
                  packed_number_stream_t **stream,
                  svn_fs_t *fs,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/noderevs.c Wed May  1 15:41:22
2013
@@ -28,6 +28,7 @@
 
 #include "noderevs.h"
 #include "string_table.h"
+#include "temp_serializer.h"
 
 /* These flags will be used with the FLAGS field in binary_noderev_t.
  */
@@ -230,7 +231,7 @@ store_id(apr_array_header_t *ids,
          apr_hash_t *dict,
          const svn_fs_id_t *id)
 {
-  binary_id_t bin_id = { 0 };
+  binary_id_t bin_id = { { 0 } };
   int idx;
 
   if (id == NULL)
@@ -292,7 +293,6 @@ svn_fs_fs__noderevs_add(svn_fs_fs__noder
                         node_revision_t *noderev)
 {
   binary_noderev_t binary_noderev = { 0 };
-  svn_boolean_t is_txn_id;
 
   binary_noderev.flags = (noderev->has_mergeinfo ? NODEREV_HAS_MINFO : 0)
                        | (noderev->copyfrom_path ? NODEREV_HAS_COPYFROM : 0)
@@ -580,11 +580,11 @@ write_reps(svn_packed__int_stream_t *rep
       svn_packed__add_uint(rep_stream, rep->expanded_size);
       
       svn_packed__add_bytes(digest_stream,
-                            rep->md5_digest,
+                            (const char *)rep->md5_digest,
                             sizeof(rep->md5_digest));
       if (rep->has_sha1)
         svn_packed__add_bytes(digest_stream,
-                              rep->sha1_digest,
+                              (const char *)rep->sha1_digest,
                               sizeof(rep->sha1_digest));
     }
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/pack.c Wed May  1 15:41:22 2013
@@ -902,7 +902,6 @@ auto_pad_block(pack_context_t *context,
       /* Yes. To up with NUL bytes and don't forget to create
        * an P2L index entry marking this section as unused. */
       svn_fs_fs__p2l_entry_t null_entry;
-      svn_fs_fs__id_part_t rev_item = { 0, SVN_FS_FS__ITEM_INDEX_UNUSED };
 
       null_entry.offset = context->pack_offset;
       null_entry.size = padding;
@@ -1149,7 +1148,6 @@ copy_items_from_temp(pack_context_t *con
                      apr_file_t *temp_file,
                      apr_pool_t *pool)
 {
-  fs_fs_data_t *ffd = context->fs->fsap_data;
   apr_pool_t *iterpool = svn_pool_create(pool);
   int i, k;
 
@@ -1166,8 +1164,6 @@ copy_items_from_temp(pack_context_t *con
       /* Copy the remaining non-NULL, non-container items to the pack file */
       for (k = i; k < i + entries_in_block; ++k)
         {
-          apr_off_t in_block_offset = context->pack_offset % ffd->block_size;
-
           svn_fs_fs__p2l_entry_t *entry
             = APR_ARRAY_IDX(entries, k, svn_fs_fs__p2l_entry_t *);
           if (!entry || entry->type == SVN_FS_FS__ITEM_TYPE_NODEREVS_CONT)
@@ -1267,7 +1263,6 @@ write_changes_containers(pack_context_t 
                          apr_file_t *temp_file,
                          apr_pool_t *pool)
 {
-  fs_fs_data_t *ffd = context->fs->fsap_data;
   apr_pool_t *iterpool = svn_pool_create(pool);
   apr_pool_t *container_pool = svn_pool_create(pool);
   int i;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c Wed May  1 15:41:22
2013
@@ -852,6 +852,10 @@ svn_fs_fs__string_table_get_func(const s
         {
           if (sub_index < sub_table->short_string_count)
             {
+              string_header_t *header;
+              apr_size_t len;
+              char *result;
+              
               /* construct a copy of our sub-table struct with SHORT_STRINGS
                  and DATA pointers resolved.  Leave all other pointers as
                  they are.  This allows us to use the same code for string
@@ -865,9 +869,9 @@ svn_fs_fs__string_table_get_func(const s
                             (const void *const *)&sub_table->short_strings);
 
               /* reconstruct the char data and return it */
-              string_header_t *header = table_copy.short_strings + sub_index;
-              apr_size_t len = header->head_length + header->tail_length + 1;
-              char *result = apr_palloc(pool, len);
+              header = table_copy.short_strings + sub_index;
+              len = header->head_length + header->tail_length + 1;
+              result = apr_palloc(pool, len);
               
               table_copy_string(result, len, &table_copy, header);
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/cache-membuffer.c?rev=1478055&r1=1478054&r2=1478055&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/cache-membuffer.c Wed May  1 15:41:22
2013
@@ -2067,7 +2067,6 @@ membuffer_cache_set_partial_internal(svn
             {
               /* Remove the old entry and try to make space for the new one.
                */
-              apr_uint32_t priority = entry->priority;
               drop_entry(cache, entry);
               if (   (cache->max_entry_size >= size)
                   && ensure_data_insertable_l1(cache, size))



Mime
View raw message