1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

Got rid of some compiler warnings about comparisons between signed

and unsigned variables.
This commit is contained in:
Wayne Davison 2005-11-15 09:34:00 +00:00
parent 6a88f113a2
commit 2288d7760b
2 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,8 @@
2005-11-15 Wayne Davison <wayned@users.sourceforge.net>
* unposted: Src/Zle/zle_misc.c: Got rid of some compiler warnings
about comparisons between signed and unsigned variables.
* 22001: Src/hashtable.c, Src/input.c, Src/loop.c, Src/Zle/compcore.c,
Src/Zle/compctl.c, Src/Zle/complist.c, Src/Zle/compresult.c,
Src/Zle/zle_hist.c, Src/Zle/zle_misc.c, Src/Zle/zle_params.c,

View file

@ -1197,8 +1197,9 @@ iremovesuffix(ZLE_INT_T c, int keep)
if (c == NO_INSERT_CHAR) {
sl = suffixnoinslen;
} else {
ZLE_CHAR_T ch = c;
/*
* Search for a match for c in the suffix list.
* Search for a match for ch in the suffix list.
* We stop if we encounter a match in a positive or negative
* list, using the suffix length specified or zero respectively.
* If we reached the end and passed through a negative
@ -1212,14 +1213,14 @@ iremovesuffix(ZLE_INT_T c, int keep)
for (ss = suffixlist; ss; ss = ss->next) {
switch (ss->tp) {
case SUFTYP_POSSTR:
if (memchr(ss->chars, c, ss->lenstr)) {
if (memchr(ss->chars, ch, ss->lenstr)) {
sl = ss->lensuf;
found = 1;
}
break;
case SUFTYP_NEGSTR:
if (memchr(ss->chars, c, ss->lenstr)) {
if (memchr(ss->chars, ch, ss->lenstr)) {
sl = 0;
found = 1;
} else {
@ -1228,14 +1229,14 @@ iremovesuffix(ZLE_INT_T c, int keep)
break;
case SUFTYP_POSRNG:
if (ss->chars[0] <= c && c <= ss->chars[1]) {
if (ss->chars[0] <= ch && ch <= ss->chars[1]) {
sl = ss->lensuf;
found = 1;
}
break;
case SUFTYP_NEGRNG:
if (ss->chars[0] <= c && c <= ss->chars[1]) {
if (ss->chars[0] <= ch && ch <= ss->chars[1]) {
sl = 0;
found = 1;
} else {