texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Sat, 16 Nov 2024 17:28:55 -0500 (EST)

branch: master
commit 04ad96f55463451babdaf7f7a9e29972eeedbcca
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 16 23:25:22 2024 +0100

    * nstall-info/install-info.c (split_entry): cast argument of isspace
    to unsigned char.  This is recommended as this function expects
    unsigned argument, and it avoids warnings with -Wchar-subscripts when
    the function is implemented with an array.
---
 ChangeLog                   | 7 +++++++
 install-info/install-info.c | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7e73dbb895..d83c696674 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-11-16  Patrice Dumas  <pertusus@free.fr>
+
+       * nstall-info/install-info.c (split_entry): cast argument of isspace
+       to unsigned char.  This is recommended as this function expects
+       unsigned argument, and it avoids warnings with -Wchar-subscripts when
+       the function is implemented with an array.
+
 2024-11-16  Patrice Dumas  <pertusus@free.fr>
 
        * info/footnotes.c (make_footnotes_node), info/indices.c
diff --git a/install-info/install-info.c b/install-info/install-info.c
index 7c3e548a25..40134ac13a 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -1620,7 +1620,7 @@ split_entry (const char *entry, char **name, size_t 
*name_len,
   while (ptr[0] != '\0')
     {
       /* Eat up the whitespace after the name, and at the start of a line. */
-      while (isspace(ptr[0]))
+      while (isspace ((unsigned char) ptr[0]))
         ptr++;
 
       /* Okay, we're at the start of the description. */
@@ -1651,7 +1651,7 @@ split_entry (const char *entry, char **name, size_t 
*name_len,
               /* *ENDPTR is the 2nd last character */
               if (*endptr == '.')
                 strcat (*description, "  ");
-              else if (!isspace (*endptr))
+              else if (!isspace ((unsigned char) *endptr))
                 strcat (*description, " ");
             }
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]