]> Savannah Git Hosting - gnulib.git/commitdiff
getlocalename_l-unsafe: Avoid undefined behaviour on Solaris 11.4.
authorBruno Haible <bruno@clisp.org>
Wed, 2 Apr 2025 18:58:17 +0000 (20:58 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 2 Apr 2025 18:58:17 +0000 (20:58 +0200)
* lib/getlocalename_l-unsafe.c (getlocalename_l_unsafe): On
Solaris 11.4, use "" as fallback.

ChangeLog
lib/getlocalename_l-unsafe.c

index 0166a1cdef1b1312e1d99c995db12f9c222e14ba..fc34d49e7a607e67cac92410c2daca51b6d77b74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-04-02  Bruno Haible  <bruno@clisp.org>
+
+       getlocalename_l-unsafe: Avoid undefined behaviour on Solaris 11.4.
+       * lib/getlocalename_l-unsafe.c (getlocalename_l_unsafe): On
+       Solaris 11.4, use "" as fallback.
+
 2025-04-01  Bruno Haible  <bruno@clisp.org>
 
        dcomp-script: Handle gdc binaries named <host>-gdc.
index 1f24f82ddbea3921e4042b414055e09a804146cd..6a72c81192162761169a6ddf45cc3d90ee62f8c3 100644 (file)
@@ -543,6 +543,8 @@ getlocalename_l_unsafe (int category, locale_t locale)
           default: /* We shouldn't get here.  */
             return (struct string_with_storage) { "", STORAGE_INDEFINITE };
           }
+      /* We shouldn't get here.  */
+      return (struct string_with_storage) { "", STORAGE_INDEFINITE };
 # else
       /* Solaris 11 OpenIndiana.
          For the internal structure of locale objects, see