subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1576354 - in /subversion/trunk/subversion: libsvn_diff/diff_file.c libsvn_fs_fs/temp_serializer.c libsvn_fs_x/temp_serializer.c libsvn_ra_svn/client.c libsvn_subr/sorts.c mod_dav_svn/reports/replay.c
Date Tue, 11 Mar 2014 14:05:53 GMT
Author: julianfoad
Date: Tue Mar 11 14:05:52 2014
New Revision: 1576354

URL: http://svn.apache.org/r1576354
Log:
Remove a few explicit casts to (void *) where implicit is sufficient.

* subversion/libsvn_diff/diff_file.c
  (svn_diff_file_options_parse): As above.

* subversion/libsvn_fs_fs/temp_serializer.c
  (svn_fs_fs__deserialize_properties,
   svn_fs_fs__replace_dir_entry,
   svn_fs_fs__deserialize_mergeinfo): As above.

* subversion/libsvn_fs_x/temp_serializer.c
  (svn_fs_x__deserialize_properties,
   svn_fs_x__replace_dir_entry,
   svn_fs_x__deserialize_mergeinfo): As above.

* subversion/libsvn_ra_svn/client.c
  (find_tunnel_agent): As above.

* subversion/libsvn_subr/sorts.c
  (heap_is_less): As above.

* subversion/mod_dav_svn/reports/replay.c
  (add_file_or_directory, open_file_or_directory): As above.

Modified:
    subversion/trunk/subversion/libsvn_diff/diff_file.c
    subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
    subversion/trunk/subversion/libsvn_fs_x/temp_serializer.c
    subversion/trunk/subversion/libsvn_ra_svn/client.c
    subversion/trunk/subversion/libsvn_subr/sorts.c
    subversion/trunk/subversion/mod_dav_svn/reports/replay.c

Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_file.c Tue Mar 11 14:05:52 2014
@@ -1248,7 +1248,7 @@ svn_diff_file_options_parse(svn_diff_fil
   opt_parsing_error_baton.pool = pool;
 
   argv[0] = "";
-  memcpy((void *) (argv + 1), args->elts, sizeof(char*) * args->nelts);
+  memcpy(argv + 1, args->elts, sizeof(char*) * args->nelts);
   argv[args->nelts + 1] = NULL;
 
   apr_getopt_init(&os, pool, args->nelts + 1, argv);

Modified: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c Tue Mar 11 14:05:52 2014
@@ -589,10 +589,10 @@ svn_fs_fs__deserialize_properties(void *
   for (i = 0; i < properties->count; ++i)
     {
       apr_size_t len = properties->keys[i+1] - properties->keys[i] - 1;
-      svn_temp_deserializer__resolve((void*)properties->keys,
+      svn_temp_deserializer__resolve(properties->keys,
                                      (void**)&properties->keys[i]);
 
-      deserialize_svn_string((void*)properties->values,
+      deserialize_svn_string(properties->values,
                              (svn_string_t **)&properties->values[i]);
 
       apr_hash_set(hash,
@@ -916,12 +916,12 @@ svn_fs_fs__replace_dir_entry(void **data
 
   /* resolve the reference to the entries array */
   entries = (svn_fs_dirent_t **)
-    svn_temp_deserializer__ptr((const char *)dir_data,
+    svn_temp_deserializer__ptr(dir_data,
                                (const void *const *)&dir_data->entries);
 
   /* resolve the reference to the lengths array */
   lengths = (apr_uint32_t *)
-    svn_temp_deserializer__ptr((const char *)dir_data,
+    svn_temp_deserializer__ptr(dir_data,
                                (const void *const *)&dir_data->lengths);
 
   /* binary search for the desired entry by name */
@@ -990,7 +990,7 @@ svn_fs_fs__replace_dir_entry(void **data
 
   dir_data = (dir_data_t *)*data;
   lengths = (apr_uint32_t *)
-    svn_temp_deserializer__ptr((const char *)dir_data,
+    svn_temp_deserializer__ptr(dir_data,
                                (const void *const *)&dir_data->lengths);
   lengths[pos] = length;
 
@@ -1148,7 +1148,7 @@ svn_fs_fs__deserialize_changes(void **ou
   /* de-serialize each entry and add it to the array */
   for (i = 0; i < changes->count; ++i)
     {
-      deserialize_change((void*)changes->changes,
+      deserialize_change(changes->changes,
                          (change_t **)&changes->changes[i]);
       APR_ARRAY_PUSH(array, change_t *) = changes->changes[i];
     }
@@ -1293,7 +1293,7 @@ svn_fs_fs__deserialize_mergeinfo(void **
       for (k = 0; k < merges->range_counts[i]; ++k, ++n)
         APR_ARRAY_PUSH(ranges, svn_merge_range_t*) = &merges->ranges[n];
 
-      svn_temp_deserializer__resolve((void*)merges->keys,
+      svn_temp_deserializer__resolve(merges->keys,
                                      (void**)&merges->keys[i]);
       apr_hash_set(mergeinfo, merges->keys[i], merges->key_lengths[i], ranges);
     }

Modified: subversion/trunk/subversion/libsvn_fs_x/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/temp_serializer.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/temp_serializer.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/temp_serializer.c Tue Mar 11 14:05:52 2014
@@ -639,10 +639,10 @@ svn_fs_x__deserialize_properties(void **
   for (i = 0; i < properties->count; ++i)
     {
       apr_size_t len = properties->keys[i+1] - properties->keys[i] - 1;
-      svn_temp_deserializer__resolve((void*)properties->keys,
+      svn_temp_deserializer__resolve(properties->keys,
                                      (void**)&properties->keys[i]);
 
-      deserialize_svn_string((void*)properties->values,
+      deserialize_svn_string(properties->values,
                              (svn_string_t **)&properties->values[i]);
 
       apr_hash_set(hash,
@@ -948,12 +948,12 @@ svn_fs_x__replace_dir_entry(void **data,
 
   /* resolve the reference to the entries array */
   entries = (svn_fs_dirent_t **)
-    svn_temp_deserializer__ptr((const char *)hash_data,
+    svn_temp_deserializer__ptr(hash_data,
                                (const void *const *)&hash_data->entries);
 
   /* resolve the reference to the lengths array */
   lengths = (apr_uint32_t *)
-    svn_temp_deserializer__ptr((const char *)hash_data,
+    svn_temp_deserializer__ptr(hash_data,
                                (const void *const *)&hash_data->lengths);
 
   /* binary search for the desired entry by name */
@@ -1022,7 +1022,7 @@ svn_fs_x__replace_dir_entry(void **data,
 
   hash_data = (hash_data_t *)*data;
   lengths = (apr_uint32_t *)
-    svn_temp_deserializer__ptr((const char *)hash_data,
+    svn_temp_deserializer__ptr(hash_data,
                                (const void *const *)&hash_data->lengths);
   lengths[pos] = length;
 
@@ -1184,7 +1184,7 @@ svn_fs_x__deserialize_changes(void **out
   /* de-serialize each entry and add it to the array */
   for (i = 0; i < changes->count; ++i)
     {
-      deserialize_change((void*)changes->changes,
+      deserialize_change(changes->changes,
                          (change_t **)&changes->changes[i],
                          pool);
       APR_ARRAY_PUSH(array, change_t *) = changes->changes[i];
@@ -1330,7 +1330,7 @@ svn_fs_x__deserialize_mergeinfo(void **o
       for (k = 0; k < merges->range_counts[i]; ++k, ++n)
         APR_ARRAY_PUSH(ranges, svn_merge_range_t*) = &merges->ranges[n];
 
-      svn_temp_deserializer__resolve((void*)merges->keys,
+      svn_temp_deserializer__resolve(merges->keys,
                                      (void**)&merges->keys[i]);
       apr_hash_set(mergeinfo, merges->keys[i], merges->key_lengths[i], ranges);
     }

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Tue Mar 11 14:05:52 2014
@@ -434,7 +434,7 @@ static svn_error_t *find_tunnel_agent(co
   for (n = 0; cmd_argv[n] != NULL; n++)
     ;
   *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
-  memcpy((void *) *argv, cmd_argv, n * sizeof(char *));
+  memcpy(*argv, cmd_argv, n * sizeof(char *));
   (*argv)[n++] = svn_path_uri_decode(hostinfo, pool);
   (*argv)[n++] = "svnserve";
   (*argv)[n++] = "-t";

Modified: subversion/trunk/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sorts.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sorts.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sorts.c Tue Mar 11 14:05:52 2014
@@ -369,7 +369,7 @@ heap_is_less(svn_priority_queue__t *queu
   /* nelts is never negative */
   assert(lhs < (apr_size_t)queue->elements->nelts);
   assert(rhs < (apr_size_t)queue->elements->nelts);
-  return queue->compare_func((void *)lhs_value, (void *)rhs_value) < 0;
+  return queue->compare_func(lhs_value, rhs_value) < 0;
 }
 
 /* Exchange elements number LHS and RHS in QUEUE.

Modified: subversion/trunk/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/replay.c?rev=1576354&r1=1576353&r2=1576354&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/replay.c Tue Mar 11 14:05:52 2014
@@ -108,7 +108,7 @@ add_file_or_directory(const char *file_o
 
   SVN_ERR(maybe_close_textdelta(eb));
 
-  *added_baton = (void *)eb;
+  *added_baton = eb;
 
   if (! copyfrom_path)
     SVN_ERR(dav_svn__brigade_printf(eb->bb, eb->output,
@@ -135,7 +135,7 @@ open_file_or_directory(const char *file_
 {
   const char *qname = apr_xml_quote_string(pool, path, 1);
   SVN_ERR(maybe_close_textdelta(eb));
-  *opened_baton = (void *)eb;
+  *opened_baton = eb;
   return dav_svn__brigade_printf(eb->bb, eb->output,
                                  "<S:open-%s name=\"%s\" rev=\"%ld\"/>"
                                  DEBUG_CR,



Mime
View raw message