1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-31 06:00:54 +01:00

Fixed some compiler warnings about signed/unsigned comparisons.

This commit is contained in:
Wayne Davison 2005-10-31 21:12:24 +00:00
parent edbe0eda22
commit e02e6d0a26
2 changed files with 5 additions and 5 deletions

View file

@ -43,7 +43,7 @@ deltochar(UNUSED(char **args))
if (n > 0) {
while (n-- && dest != zlell) {
while (dest != zlell && zleline[dest] != c)
while (dest != zlell && (ZLE_INT_T)zleline[dest] != c)
dest++;
if (dest != zlell) {
if (!zap || n > 0)
@ -59,9 +59,9 @@ deltochar(UNUSED(char **args))
if (dest)
dest--;
while (n++ && dest != 0) {
while (dest != 0 && zleline[dest] != c)
while (dest != 0 && (ZLE_INT_T)zleline[dest] != c)
dest--;
if (zleline[dest] == c) {
if ((ZLE_INT_T)zleline[dest] == c) {
if (!n) {
backkill(zlecs - dest - zap, 1);
ok++;

View file

@ -306,7 +306,7 @@ stringaszleline(unsigned char *instr, int incs,
if (outcs) {
int offs = inptr - (char *)instr;
if (offs <= incs && incs < offs + ret)
if (offs <= incs && incs < offs + (int)ret)
*outcs = outptr - outstr;
}
@ -617,7 +617,7 @@ zlinecmp(ZLE_STRING_T histp, int histl, ZLE_STRING_T inputp, int inputl)
}
for (cnt = inputl; cnt; cnt--) {
if (*inputp++ != ZC_tolower(*histp++))
if ((ZLE_INT_T)*inputp++ != ZC_tolower(*histp++))
return 3;
}
/* Is second string is lowercase version of first? */