Author: svn-role
Date: Sat Jul  6 04:00:08 2024
New Revision: 1918958

URL: http://svn.apache.org/viewvc?rev=1918958&view=rev
Log:
Merge the r1915236 group from trunk:

  * r1915236, r1915239
    Support building swig-rb with clang 16 / GCC14 
    Justification:
      Distros moving to newer compilers that treat these as errors
    Votes:
     +1: astieger, dsahlberg, jamessan

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg
    
subversion/branches/1.14.x/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1915236,1915239

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1918958&r1=1918957&r2=1918958&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Sat Jul  6 04:00:08 2024
@@ -28,13 +28,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
-  * r1915236, r1915239
-    Support building swig-rb with clang 16 / GCC14 
-    Justification:
-      Distros moving to newer compilers that treat these as errors
-    Votes:
-     +1: astieger, dsahlberg, jamessan
-
  * r1918138, r1918139
    Fix unbounded memory usage in propget and proplist --xml commands
    Justification:

Modified: 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg?rev=1918958&r1=1918957&r2=1918958&view=diff
==============================================================================
--- 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg 
(original)
+++ 
subversion/branches/1.14.x/subversion/bindings/swig/include/svn_containers.swg 
Sat Jul  6 04:00:08 2024
@@ -299,7 +299,7 @@
   $1 = svn_swig_rb_hash_to_apr_hash_svn_string($input, _global_pool);
   _global_pool = NULL;
   if (!NIL_P(rb_pool)) {
-    if (NIL_P($1)) {
+    if ($1 == NULL) {
       svn_swig_rb_destroy_pool(rb_pool);
     } else {
       svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);
@@ -373,7 +373,7 @@
     svn_swig_rb_hash_to_apr_hash_string($input, _global_pool);
   _global_pool = NULL;
   if (!NIL_P(rb_pool)) {
-    if (NIL_P($1)) {
+    if ($1 == NULL) {
       svn_swig_rb_destroy_pool(rb_pool);
     } else {
       svn_swig_rb_set_pool_for_no_swig_type($input, rb_pool);

Modified: 
subversion/branches/1.14.x/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1918958&r1=1918957&r2=1918958&view=diff
==============================================================================
--- 
subversion/branches/1.14.x/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
 (original)
+++ 
subversion/branches/1.14.x/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
 Sat Jul  6 04:00:08 2024
@@ -788,7 +788,7 @@ svn_swig_rb_set_pool(VALUE target, VALUE
     struct rb_set_pool_for_hash_arg arg;
     arg.set = FALSE;
     arg.pool = pool;
-    rb_hash_foreach(target, rb_set_pool_for_hash_callback, (VALUE)&arg);
+    rb_hash_foreach(target, (int(*)(ANYARGS))rb_set_pool_for_hash_callback, 
(VALUE)&arg);
     return arg.set;
   } else {
     return rb_set_pool_if_swig_type_object(target, pool);
@@ -806,7 +806,7 @@ svn_swig_rb_set_pool_for_no_swig_type(VA
     target = rb_ary_new3(1, target);
   }
 
-  rb_iterate(rb_each, target, rb_set_pool, pool);
+  rb_iterate((VALUE(*)())rb_each, target, (VALUE(*)())rb_set_pool, pool);
 }
 
 void
@@ -1070,7 +1070,8 @@ svn_swig_rb_to_apr_array_row_prop(VALUE
     result = apr_array_make(pool, 0, sizeof(svn_prop_t));
     arg.array = result;
     arg.pool = pool;
-    rb_hash_foreach(array_or_hash, svn_swig_rb_to_apr_array_row_prop_callback,
+    rb_hash_foreach(array_or_hash,
+                    
(int(*)(ANYARGS))svn_swig_rb_to_apr_array_row_prop_callback,
                     (VALUE)&arg);
     return result;
   } else {
@@ -1125,7 +1126,8 @@ svn_swig_rb_to_apr_array_prop(VALUE arra
     result = apr_array_make(pool, 0, sizeof(svn_prop_t *));
     arg.array = result;
     arg.pool = pool;
-    rb_hash_foreach(array_or_hash, svn_swig_rb_to_apr_array_prop_callback,
+    rb_hash_foreach(array_or_hash,
+                    (int(*)(ANYARGS))svn_swig_rb_to_apr_array_prop_callback,
                     (VALUE)&arg);
     return result;
   } else {
@@ -1548,7 +1550,7 @@ r2c_hash(VALUE hash, r2c_func func, void
     data.func = func;
     data.pool = pool;
 
-    rb_hash_foreach(hash, r2c_hash_i, (VALUE)&data);
+    rb_hash_foreach(hash, (int(*)(ANYARGS))r2c_hash_i, (VALUE)&data);
 
     return apr_hash;
   }
@@ -1570,7 +1572,9 @@ svn_swig_rb_hash_to_apr_hash_svn_string(
 apr_hash_t *
 svn_swig_rb_hash_to_apr_hash_swig_type(VALUE hash, const char *typename, 
apr_pool_t *pool)
 {
-  return r2c_hash(hash, r2c_swig_type, (void *)typename, pool);
+  /* Note: casting to r2c_cunc for r2c_swig_type may unsafe, because
+         it contains the cast from "const void *" to "void *" */
+  return r2c_hash(hash, (r2c_func)r2c_swig_type, (void *)typename, pool);
 }
 
 apr_hash_t *
@@ -1651,7 +1655,8 @@ invoke_callback(VALUE baton, VALUE pool)
   argv[0] = pool;
   svn_swig_rb_get_pool(1, argv, Qnil, &subpool, NULL);
   cbb->pool = subpool;
-  return rb_ensure(callback, baton, callback_ensure, subpool);
+  return rb_ensure((VALUE(*)(ANYARGS))callback, baton,
+                   (VALUE(*)(ANYARGS))callback_ensure, subpool);
 }
 
 static VALUE
@@ -1660,9 +1665,9 @@ callback_handle_error(VALUE baton, ...)
   callback_handle_error_baton_t *handle_error_baton;
   handle_error_baton = (callback_handle_error_baton_t *)baton;
 
-  return rb_rescue2(callback,
+  return rb_rescue2((VALUE(*)(ANYARGS))callback,
                     (VALUE)(handle_error_baton->callback_baton),
-                    callback_rescue,
+                    (VALUE(*)(ANYARGS))callback_rescue,
                     (VALUE)(handle_error_baton->rescue_baton),
                     rb_svn_error(),
                     (VALUE)0);
@@ -1681,8 +1686,9 @@ invoke_callback_handle_error(VALUE baton
   handle_error_baton.callback_baton = cbb;
   handle_error_baton.rescue_baton = &rescue_baton;
 
-  return rb_ensure(callback_handle_error, (VALUE)&handle_error_baton,
-                   callback_ensure, pool);
+  return rb_ensure((VALUE(*)(ANYARGS))callback_handle_error,
+                   (VALUE)&handle_error_baton,
+                   (VALUE(*)(ANYARGS))callback_ensure, pool);
 }
 
 
@@ -1735,7 +1741,8 @@ svn_swig_rb_set_baton(VALUE target, VALU
     target = rb_ary_new3(1, target);
   }
 
-  rb_iterate(rb_each, target, add_baton_if_delta_editor, baton);
+  rb_iterate((VALUE(*)())rb_each, target,
+             (VALUE(*)())add_baton_if_delta_editor, baton);
 }
 
 


Reply via email to