Use unsigned variables in a few places.

Eliminates gcc 4.9 warnings.
This commit is contained in:
Craig Rodrigues 2015-09-14 18:59:01 +00:00
parent 76470dd50e
commit e263ec16a9
3 changed files with 6 additions and 5 deletions

View File

@ -1238,7 +1238,7 @@ compat_setgrent(void *retval, void *mdata, va_list ap)
int rv, stayopen;
#define set_setent(x, y) do { \
int i; \
unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \
@ -1308,7 +1308,7 @@ compat_group(void *retval, void *mdata, va_list ap)
int rv, stayopen, *errnop;
#define set_lookup_type(x, y) do { \
int i; \
unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \

View File

@ -1607,7 +1607,8 @@ compat_redispatch(struct compat_state *st, enum nss_lookup_type how,
{ NULL, NULL, NULL }
};
void *discard;
int rv, e, i;
int rv, e;
unsigned int i;
for (i = 0; i < sizeof(dtab)/sizeof(dtab[0]) - 1; i++)
dtab[i].mdata = (void *)lookup_how;
@ -1702,7 +1703,7 @@ compat_setpwent(void *retval, void *mdata, va_list ap)
int rv, stayopen;
#define set_setent(x, y) do { \
int i; \
unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \

View File

@ -100,7 +100,7 @@ fflagstostr(u_long flags)
const char *sp;
char *dp;
u_long setflags;
int i;
u_int i;
if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL)
return (NULL);