aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-13 16:00:10 +0930
committerAlan Modra <amodra@gmail.com>2021-04-13 16:14:20 +0930
commit1cfc6f00e45104551da9146bb413b60acd0e387f (patch)
tree37569c31f2370ae8ad37517d72e7400e814886e5 /ld
parent0fa29e2deea19a33fec7f1e5a5cf49b94f93b2f8 (diff)
downloadgdb-1cfc6f00e45104551da9146bb413b60acd0e387f.zip
gdb-1cfc6f00e45104551da9146bb413b60acd0e387f.tar.gz
gdb-1cfc6f00e45104551da9146bb413b60acd0e387f.tar.bz2
PR27722, error: array subscript has type char
PR 27722 * libdep_plugin.c (str2vec): Don't pass a potentially signed char to isspace.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/libdep_plugin.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c862e8b..e7620ce 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-13 Alan Modra <amodra@gmail.com>
+
+ PR 27722
+ * libdep_plugin.c (str2vec): Don't pass a potentially signed char
+ to isspace.
+
2021-04-12 Alan Modra <amodra@gmail.com>
* configure.ac (--enable-checking): Add support.
diff --git a/ld/libdep_plugin.c b/ld/libdep_plugin.c
index 7c108e4..5130c6f 100644
--- a/ld/libdep_plugin.c
+++ b/ld/libdep_plugin.c
@@ -139,7 +139,7 @@ str2vec (char *in)
end = in + strlen (in);
s = in;
- while (isspace (*s)) s++;
+ while (isspace ((unsigned char) *s)) s++;
first = s;
i = 1;
@@ -163,12 +163,12 @@ str2vec (char *in)
memmove (s, s+1, end-s-1);
end--;
}
- if (isspace (*s))
+ if (isspace ((unsigned char) *s))
{
if (sq || dq)
continue;
*s++ = '\0';
- while (isspace (*s)) s++;
+ while (isspace ((unsigned char) *s)) s++;
if (*s)
res[++i] = s;
}