1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-03 08:11:03 +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)
if (pfxlen(p, hn->nam) == l) {
n++;
if (strlen(hn->nam) == l)
if ((int)strlen(hn->nam) == l)
e = 1;
}
return (n == 1) ? (getsparam(p) != NULL) :
@ -1472,7 +1472,7 @@ get_comp_string(void)
if (!isset(IGNOREBRACES)) {
/* 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 *bbeg = NULL, *bend = NULL, *dbeg = NULL;
char *lastp = NULL, *firsts = NULL;

View file

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

View file

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

View file

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