In a testdir, on FreeBSD 5.2.1, I see this warning:

../../gllib/mbspbrk.c:45: warning: unused variable `iter'

This patch fixes it.


2023-10-15  Bruno Haible  <br...@clisp.org>

        mbspbrk: Fix gcc warning (regression 2023-09-26).
        * lib/mbspbrk.c (mbspbrk): Fix gcc warning in GNULIB_MCEL_PREFER mode.

diff --git a/lib/mbspbrk.c b/lib/mbspbrk.c
index b1ee02942f..7817873a16 100644
--- a/lib/mbspbrk.c
+++ b/lib/mbspbrk.c
@@ -45,7 +45,7 @@ mbspbrk (const char *string, const char *accept)
       char const *iter = string;
 #if GNULIB_MCEL_PREFER
       mcel_t a, g;
-      for (char const *iter = string; *iter; iter += g.len)
+      for (; *iter; iter += g.len)
         {
           g = mcel_scanz (iter);
           if (g.len == 1)




Reply via email to