]> Savannah Git Hosting - gnulib.git/commitdiff
striconveh, *vasnprintf, vasnwprintf: Make more shared-library friendly.
authorBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2023 07:23:32 +0000 (09:23 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2023 07:23:32 +0000 (09:23 +0200)
* lib/striconveh.c (mem_cd_iconveh_internal): Mark hex as 'const'.
* lib/vasnprintf.c (wctomb_fallback): Likewise.

ChangeLog
lib/striconveh.c
lib/vasnprintf.c

index 4430828d3b34ecb8ecf63f3ec3ff88325722bc20..8955cbc6089ac33fdef38a28c58e37e789e7e8d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-09-22  Bruno Haible  <bruno@clisp.org>
+
+       striconveh, *vasnprintf, vasnwprintf: Make more shared-library friendly.
+       * lib/striconveh.c (mem_cd_iconveh_internal): Mark hex as 'const'.
+       * lib/vasnprintf.c (wctomb_fallback): Likewise.
+
 2023-09-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        mbschr, mbsrchr: support GNULIB_MCEL_PREFER
index 0209dc6cf230aa83bfd2c09b75764f5de6388d09..be6040737307d7ac50f612344e9343c06f9b6bf4 100644 (file)
@@ -810,7 +810,7 @@ mem_cd_iconveh_internal (const char *src, size_t srclen,
 
                         if (handler == iconveh_escape_sequence)
                           {
-                            static char hex[16] = "0123456789ABCDEF";
+                            static char const hex[16] = "0123456789ABCDEF";
                             scratchlen = 0;
                             scratchbuf[scratchlen++] = '\\';
                             if (uc < 0x10000)
index 2d9aa977ecbf5385d35b1953d21ec9852b90a590..815c7c509859e93d3c1125bdb1fd1a9f73fc0a49 100644 (file)
@@ -294,7 +294,7 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
 static size_t
 wctomb_fallback (char *s, wchar_t wc)
 {
-  static char hex[16] = "0123456789ABCDEF";
+  static char const hex[16] = "0123456789ABCDEF";
 
   s[0] = '\\';
   if (sizeof (wchar_t) > 2 && wc > 0xffff)