Fixed compiler warnings while building the BBS. Thanks to Ken Bowley for the

patches.
This commit is contained in:
Andrew Leary
2016-09-29 04:55:12 -04:00
parent f7401d92d0
commit b6e58185cd
42 changed files with 93 additions and 83 deletions

View File

@@ -30,6 +30,7 @@ all: ${TARGET}
clean:
rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
rm -f login.defs
mbuseradd: ${MBUSERADD_OBJS}
${CC} -o mbuseradd ${MBUSERADD_OBJS} ${LDFLAGS} ${LIBS}

View File

@@ -85,7 +85,7 @@ void dolastlog(struct lastlog *ll, const struct passwd *pw, const char *line, co
if (ll)
*ll = newlog;
time(&newlog.ll_time);
time((time_t *) &newlog.ll_time);
strncpy(newlog.ll_line, line, sizeof newlog.ll_line);
#ifdef HAVE_LL_HOST
strncpy(newlog.ll_host, host, sizeof newlog.ll_host);

View File

@@ -120,7 +120,7 @@ void checkutmp(int picky)
/* XXX - assumes /dev/tty?? */
strncpy(utent.ut_id, utent.ut_line + 3, sizeof utent.ut_id);
strcpy(utent.ut_user, "LOGIN");
time(&utent.ut_time);
time((time_t *) &utent.ut_time);
}
}
@@ -294,7 +294,7 @@ void setutmp(const char *name, const char *line, const char *host)
{
utent.ut_type = USER_PROCESS;
strncpy(utent.ut_user, name, sizeof utent.ut_user);
time(&utent.ut_time);
time((time_t *) &utent.ut_time);
/* other fields already filled in by checkutmp above */
setutent();
pututline(&utent);