Author: brane
Date: Sat May 23 06:12:43 2026
New Revision: 1934527

Log:
Fix new compilation warnings in maintainer mode.

* subversion/libsvn_subr/utf8proc.c:
   Include svn_utf.h for the prototype of svn_utf_cstring_utf8_width().
                                                [-Wmissing-prototypes]
  (svn_utf__cstring_utf8_align_right,
   svn_utf__cstring_utf8_align_left): Use apr_size_t for string length
   and apr_ssize_t for char pointer difference. [-Wshorten-64-to-32]

Modified:
   subversion/trunk/subversion/libsvn_subr/utf8proc.c

Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c  Sat May 23 04:20:06 
2026        (r1934526)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c  Sat May 23 06:12:43 
2026        (r1934527)
@@ -25,6 +25,7 @@
 
 #include <apr_fnmatch.h>
 
+#include "svn_utf.h"
 #include "private/svn_string_private.h"
 #include "private/svn_utf_private.h"
 #include "svn_private_config.h"
@@ -669,11 +670,11 @@ svn_utf__cstring_utf8_align_right(const
                                   apr_pool_t *pool)
 {
   int width = svn_utf_cstring_utf8_width(cstr);
-  int size = strlen(cstr);
+  apr_size_t size = strlen(cstr);
 
   if (width > padding)
     {
-      int len = utf8_skipn(cstr, padding) - cstr;
+      apr_ssize_t len = utf8_skipn(cstr, padding) - cstr;
       return apr_pstrmemdup(pool, cstr + size - len, len);
     }
   else
@@ -695,12 +696,12 @@ svn_utf__cstring_utf8_align_left(const c
 
   if (width > padding)
     {
-      int len = utf8_skipn(cstr, padding) - cstr;
+      apr_ssize_t len = utf8_skipn(cstr, padding) - cstr;
       return apr_pstrmemdup(pool, cstr, len);
     }
   else
     {
-      int size = strlen(cstr);
+      apr_size_t size = strlen(cstr);
       int spaces = padding - width;
       char *result = apr_palloc(pool, size + spaces + 1);
       memcpy(result, cstr, size);

Reply via email to