mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Fix "subscript has type `char'" warnings by casting to int, as
discussed on -arch.
This commit is contained in:
parent
fb2ef61513
commit
e92feeebb1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54132
@ -315,7 +315,7 @@ exptilde(p, flag)
|
|||||||
goto lose;
|
goto lose;
|
||||||
*p = c;
|
*p = c;
|
||||||
while ((c = *home++) != '\0') {
|
while ((c = *home++) != '\0') {
|
||||||
if (quotes && SQSYNTAX[c] == CCTL)
|
if (quotes && SQSYNTAX[(int)c] == CCTL)
|
||||||
STPUTC(CTLESC, expdest);
|
STPUTC(CTLESC, expdest);
|
||||||
STPUTC(c, expdest);
|
STPUTC(c, expdest);
|
||||||
}
|
}
|
||||||
@ -478,7 +478,7 @@ expbackq(cmd, quoted, flag)
|
|||||||
}
|
}
|
||||||
lastc = *p++;
|
lastc = *p++;
|
||||||
if (lastc != '\0') {
|
if (lastc != '\0') {
|
||||||
if (quotes && syntax[lastc] == CCTL)
|
if (quotes && syntax[(int)lastc] == CCTL)
|
||||||
STPUTC(CTLESC, dest);
|
STPUTC(CTLESC, dest);
|
||||||
STPUTC(lastc, dest);
|
STPUTC(lastc, dest);
|
||||||
}
|
}
|
||||||
@ -694,7 +694,8 @@ evalvar(p, flag)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while (*val) {
|
while (*val) {
|
||||||
if (quotes && syntax[*val] == CCTL)
|
if (quotes &&
|
||||||
|
syntax[(int)*val] == CCTL)
|
||||||
STPUTC(CTLESC, expdest);
|
STPUTC(CTLESC, expdest);
|
||||||
STPUTC(*val++, expdest);
|
STPUTC(*val++, expdest);
|
||||||
}
|
}
|
||||||
@ -865,7 +866,7 @@ varvalue(name, quoted, allow_split)
|
|||||||
if (allow_split) { \
|
if (allow_split) { \
|
||||||
syntax = quoted? DQSYNTAX : BASESYNTAX; \
|
syntax = quoted? DQSYNTAX : BASESYNTAX; \
|
||||||
while (*p) { \
|
while (*p) { \
|
||||||
if (syntax[*p] == CCTL) \
|
if (syntax[(int)*p] == CCTL) \
|
||||||
STPUTC(CTLESC, expdest); \
|
STPUTC(CTLESC, expdest); \
|
||||||
STPUTC(*p++, expdest); \
|
STPUTC(*p++, expdest); \
|
||||||
} \
|
} \
|
||||||
|
@ -1457,7 +1457,7 @@ noexpand(text)
|
|||||||
continue;
|
continue;
|
||||||
if (c == CTLESC)
|
if (c == CTLESC)
|
||||||
p++;
|
p++;
|
||||||
else if (BASESYNTAX[c] == CCTL)
|
else if (BASESYNTAX[(int)c] == CCTL)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user