]> Savannah Git Hosting - gnulib.git/commitdiff
c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Apr 2024 19:43:28 +0000 (12:43 -0700)
committerBruno Haible <bruno@clisp.org>
Fri, 26 Apr 2024 09:01:51 +0000 (11:01 +0200)
* lib/c32srtombs-state.c (_gl_c32srtombs_state):
* lib/mbsrtoc32s-state.c (_gl_mbsrtoc32s_state):
* lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state):
* lib/wcsrtombs-state.c (_gl_wcsrtombs_state):
Add an extern decl for a “private” extern symbol, to pacify GCC
14’s -Wmissing-variable-declarations option.

ChangeLog
lib/c32srtombs-state.c
lib/mbsrtoc32s-state.c
lib/mbsrtowcs-state.c
lib/wcsrtombs-state.c

index 5ab21dd75a43099d2823ed37e7147c6b4e52fee1..d8ddf140ed649cc251193bbe7d6628edc40c5b6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-04-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
+       * lib/c32srtombs-state.c (_gl_c32srtombs_state):
+       * lib/mbsrtoc32s-state.c (_gl_mbsrtoc32s_state):
+       * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state):
+       * lib/wcsrtombs-state.c (_gl_wcsrtombs_state):
+       Add an extern decl for a “private” extern symbol, to pacify GCC
+       14’s -Wmissing-variable-declarations option.
+
 2024-04-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        manywarnings: update C warnings for GCC 14
index 8bd5ea32b543a6c943ad18c6785e0d735b7676ca..f9a04cf13b3110a9d08a0e2b02232fff3ec478a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert 32-bit wide string to string.
-   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+   Copyright (C) 2008-2024 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2020.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <wchar.h>
 
 /* Internal state used by the functions c32srtombs() and c32snrtombs().  */
+extern mbstate_t _gl_c32srtombs_state;
 mbstate_t _gl_c32srtombs_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
    On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,
index 91a18fdd7435176db62c826ac75067c537600670..26c6f4a53e5708390252ec734808be3ab9649cb0 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string to 32-bit wide string.
-   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+   Copyright (C) 2008-2024 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2020.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <wchar.h>
 
 /* Internal state used by the functions mbsrtoc32s() and mbsnrtoc32s().  */
+extern mbstate_t _gl_mbsrtoc32s_state;
 mbstate_t _gl_mbsrtoc32s_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
    On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,
index 0949a370c8e775a0e92cfb4b7da5be8198459494..86a32a95ca41e4e034953d80acdf5ce4248b5dc7 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+   Copyright (C) 2008-2024 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <wchar.h>
 
 /* Internal state used by the functions mbsrtowcs() and mbsnrtowcs().  */
+extern mbstate_t _gl_mbsrtowcs_state;
 mbstate_t _gl_mbsrtowcs_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
    On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,
index c7d47c472ef303977e023da51cbf95821496c6b2..764f3607cff3c4738428cf1400df85ba809ed512 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert wide string to string.
-   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+   Copyright (C) 2008-2024 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This file is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@
 #include <wchar.h>
 
 /* Internal state used by the functions wcsrtombs() and wcsnrtombs().  */
+extern mbstate_t _gl_wcsrtombs_state;
 mbstate_t _gl_wcsrtombs_state
 /* The state must initially be in the "initial state"; so, zero-initialize it.
    On most systems, putting it into BSS is sufficient.  Not so on Mac OS X 10.3,