Fix "subscript has type `char'" warnings by casting to int, as

discussed on -arch.
This commit is contained in:
cracauer 1999-12-04 17:12:47 +00:00
parent 4dc09bb8c8
commit a98edd94ad
2 changed files with 6 additions and 5 deletions

View File

@ -315,7 +315,7 @@ exptilde(p, flag)
goto lose;
*p = c;
while ((c = *home++) != '\0') {
if (quotes && SQSYNTAX[c] == CCTL)
if (quotes && SQSYNTAX[(int)c] == CCTL)
STPUTC(CTLESC, expdest);
STPUTC(c, expdest);
}
@ -478,7 +478,7 @@ expbackq(cmd, quoted, flag)
}
lastc = *p++;
if (lastc != '\0') {
if (quotes && syntax[lastc] == CCTL)
if (quotes && syntax[(int)lastc] == CCTL)
STPUTC(CTLESC, dest);
STPUTC(lastc, dest);
}
@ -694,7 +694,8 @@ evalvar(p, flag)
}
else {
while (*val) {
if (quotes && syntax[*val] == CCTL)
if (quotes &&
syntax[(int)*val] == CCTL)
STPUTC(CTLESC, expdest);
STPUTC(*val++, expdest);
}
@ -865,7 +866,7 @@ varvalue(name, quoted, allow_split)
if (allow_split) { \
syntax = quoted? DQSYNTAX : BASESYNTAX; \
while (*p) { \
if (syntax[*p] == CCTL) \
if (syntax[(int)*p] == CCTL) \
STPUTC(CTLESC, expdest); \
STPUTC(*p++, expdest); \
} \

View File

@ -1457,7 +1457,7 @@ noexpand(text)
continue;
if (c == CTLESC)
p++;
else if (BASESYNTAX[c] == CCTL)
else if (BASESYNTAX[(int)c] == CCTL)
return 0;
}
return 1;