From: Bruno Haible Date: Tue, 3 Oct 2023 08:16:01 +0000 (+0200) Subject: mcel: Fix compilation error in tests. X-Git-Tag: v1.0~752 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e7477788b7ca418590f8dd741e3ead6817814aa6;p=gnulib.git mcel: Fix compilation error in tests. * lib/mcel.h (mcel_scan): Undefine 'mbs' after use. --- diff --git a/ChangeLog b/ChangeLog index 14892c7f71..38e339b6c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-10-03 Bruno Haible + + mcel: Fix compilation error in tests. + * lib/mcel.h (mcel_scan): Undefine 'mbs' after use. + 2023-10-02 Bruno Haible localename, gettext: Avoid crash on macOS 14. diff --git a/lib/mcel.h b/lib/mcel.h index 54ae125957..b178c7aec9 100644 --- a/lib/mcel.h +++ b/lib/mcel.h @@ -249,6 +249,8 @@ mcel_scan (char const *p, char const *lim) char32_t ch; size_t len = mbrtoc32 (&ch, p, lim - p, &mbs); +#undef mbs + /* Any LEN with top bit set is an encoding error, as LEN == (size_t) -3 is not supported and MB_LEN_MAX is small. */ if (_GL_UNLIKELY ((size_t) -1 / 2 < len))