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

Silenced two signed/unsigned comparison compiler warnings.

This commit is contained in:
Wayne Davison 2004-05-28 19:21:05 +00:00
parent fea94cd79f
commit 14c7f464c2
4 changed files with 8 additions and 8 deletions

View file

@ -399,7 +399,7 @@ checkparams(char *p)
for (hn = paramtab->nodes[t0]; n < 2 && hn; hn = hn->next) for (hn = paramtab->nodes[t0]; n < 2 && hn; hn = hn->next)
if (pfxlen(p, hn->nam) == l) { if (pfxlen(p, hn->nam) == l) {
n++; n++;
if (strlen(hn->nam) == l) if ((int)strlen(hn->nam) == l)
e = 1; e = 1;
} }
return (n == 1) ? (getsparam(p) != NULL) : return (n == 1) ? (getsparam(p) != NULL) :
@ -1472,7 +1472,7 @@ get_comp_string(void)
if (!isset(IGNOREBRACES)) { if (!isset(IGNOREBRACES)) {
/* Try and deal with foo{xxx etc. */ /* Try and deal with foo{xxx etc. */
char *curs = s + (isset(COMPLETEINWORD) ? offs : strlen(s)); char *curs = s + (isset(COMPLETEINWORD) ? offs : (int)strlen(s));
char *predup = dupstring(s), *dp = predup; char *predup = dupstring(s), *dp = predup;
char *bbeg = NULL, *bend = NULL, *dbeg = NULL; char *bbeg = NULL, *bend = NULL, *dbeg = NULL;
char *lastp = NULL, *firsts = NULL; char *lastp = NULL, *firsts = NULL;

View file

@ -425,7 +425,7 @@ patcompile(char *exp, int inflags, char **endexp)
len = 0; len = 0;
for (; pscan; pscan = PATNEXT(pscan)) for (; pscan; pscan = PATNEXT(pscan))
if (P_OP(pscan) == P_EXACTLY && if (P_OP(pscan) == P_EXACTLY &&
strlen((char *)P_OPERAND(pscan)) >= len) { (int)strlen((char *)P_OPERAND(pscan)) >= len) {
lng = (char *)P_OPERAND(pscan); lng = (char *)P_OPERAND(pscan);
len = strlen(lng); len = strlen(lng);
} }
@ -2023,7 +2023,7 @@ patmatch(Upat prog)
int ptlen = strlen(patinput); int ptlen = strlen(patinput);
int oplen = strlen(nextop); int oplen = strlen(nextop);
/* Are we in the right range? */ /* Are we in the right range? */
if (oplen > strlen(min ? METANEXT(start) : start) || if (oplen > (int)strlen(min ? METANEXT(start) : start) ||
oplen < ptlen) oplen < ptlen)
return 0; return 0;
/* Yes, just position appropriately and test. */ /* Yes, just position appropriately and test. */

View file

@ -283,11 +283,11 @@ putpromptchar(int doprint, int endchar)
test = 1; test = 1;
break; break;
case '#': case '#':
if (geteuid() == arg) if (geteuid() == (uid_t)arg)
test = 1; test = 1;
break; break;
case 'g': case 'g':
if (getegid() == arg) if (getegid() == (gid_t)arg)
test = 1; test = 1;
break; break;
case 'j': case 'j':

View file

@ -515,7 +515,7 @@ finddir(char *s)
if(!strcmp(s, finddir_full) && *finddir_full) if(!strcmp(s, finddir_full) && *finddir_full)
return finddir_last; return finddir_last;
if(strlen(s) >= ffsz) { if ((int)strlen(s) >= ffsz) {
free(finddir_full); free(finddir_full);
finddir_full = zalloc(ffsz = strlen(s) * 2); finddir_full = zalloc(ffsz = strlen(s) * 2);
} }
@ -1908,7 +1908,7 @@ colonsplit(char *s, int uniq)
for (; *t && *t != ':'; t++); for (; *t && *t != ':'; t++);
if (uniq) if (uniq)
for (p = ret; p < ptr; p++) for (p = ret; p < ptr; p++)
if (strlen(*p) == t - s && ! strncmp(*p, s, t - s)) if ((int)strlen(*p) == t - s && ! strncmp(*p, s, t - s))
goto cont; goto cont;
*ptr = (char *) zalloc((t - s) + 1); *ptr = (char *) zalloc((t - s) + 1);
ztrncpy(*ptr++, s, t - s); ztrncpy(*ptr++, s, t - s);