[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14
From: |
Paul Eggert |
Subject: |
[PATCH] c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14 |
Date: |
Wed, 24 Apr 2024 12:45:05 -0700 |
* 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 | 10 ++++++++++
lib/c32srtombs-state.c | 1 +
lib/mbsrtoc32s-state.c | 1 +
lib/mbsrtowcs-state.c | 1 +
lib/wcsrtombs-state.c | 1 +
5 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index fa7b31bb40..6564e09ac5 100644
--- 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-24 Bruno Haible <bruno@clisp.org>
physmem: Port better to Linux.
diff --git a/lib/c32srtombs-state.c b/lib/c32srtombs-state.c
index 4cd95017ec..30d7b17bcc 100644
--- a/lib/c32srtombs-state.c
+++ b/lib/c32srtombs-state.c
@@ -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 an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X
10.3,
diff --git a/lib/mbsrtoc32s-state.c b/lib/mbsrtoc32s-state.c
index 4f6eeaa9db..6bcd4387db 100644
--- a/lib/mbsrtoc32s-state.c
+++ b/lib/mbsrtoc32s-state.c
@@ -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 an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X
10.3,
diff --git a/lib/mbsrtowcs-state.c b/lib/mbsrtowcs-state.c
index cbb8753b43..da036ec581 100644
--- a/lib/mbsrtowcs-state.c
+++ b/lib/mbsrtowcs-state.c
@@ -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 an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X
10.3,
diff --git a/lib/wcsrtombs-state.c b/lib/wcsrtombs-state.c
index 037887a57f..d22dfaee53 100644
--- a/lib/wcsrtombs-state.c
+++ b/lib/wcsrtombs-state.c
@@ -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 an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X
10.3,
--
2.44.0
- [PATCH] c32srtombs,mbsrtoc32s,mbsrtowcs,wcsrtombs: pacify GCC 14,
Paul Eggert <=