forked from Imagelibrary/binutils-gdb
PR27722, error: array subscript has type char
PR 27722 * libdep_plugin.c (str2vec): Don't pass a potentially signed char to isspace.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user