From 2288d7760b674e54693e32e0d7e0f1040f177f83 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 15 Nov 2005 09:34:00 +0000 Subject: Got rid of some compiler warnings about comparisons between signed and unsigned variables. --- ChangeLog | 3 +++ Src/Zle/zle_misc.c | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 729f5cb4f..f4a0d0eda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-11-15 Wayne Davison + * 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, diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index cd91744f8..b3706f2d0 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -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 { -- cgit 1.4.1