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

@ -1,3 +1,8 @@
v1.0.6.9 28-Sep-2016 - Andrew Leary
1. Fixed compiler warnings while building the BBS. Thanks to
Ken Bowley for the patches.
v1.0.6.8 20-Jul-2016 - Andrew Leary
1. Fixed the SETUP.sh script to handle installing on fresh

View File

@ -148,7 +148,9 @@ dist tar: ${TARFILE}
clean:
rm -f .filelist core ${TARFILE} paths.h config.h
rm -f FILE_ID.DIZ INSTALL config.log config.status stamp-h
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done;
rm -f Makefile.global
${TARFILE}: .filelist
cd ..; ln -s ${PACKAGE} ${PACKAGE}-${VERSION} ; rm -f ${TARFILE}; \

6
configure vendored
View File

@ -2309,10 +2309,10 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="6.8"
REVISION="6.9"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2016 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2016 M. Broek"
COPYRIGHT="Copyright (C) 1997-2016 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2016 MBSE DevTm"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -12,10 +12,10 @@ AC_SUBST(SUBDIRS)
PACKAGE="mbsebbs"
MAJOR="1"
MINOR="0"
REVISION="6.8"
REVISION="6.9"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2016 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2016 M. Broek"
COPYRIGHT="Copyright (C) 1997-2016 MBSE Development Team, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2016 MBSE DevTm"
GROUP="bbs"
OWNER="mbse"
ROWNER="`id -un root`"

View File

@ -115,6 +115,7 @@ install:
clean:
rm -f filelist
rm -f basic.html index.html upgrade.html
filelist: Makefile
BASE=`pwd`; \

View File

@ -594,7 +594,7 @@ fidoaddr *faddr2fido(faddr *aka)
fidoaddr *Sys;
Sys = (fidoaddr *)malloc(sizeof(fidoaddr));
memset(Sys, 0, sizeof(Sys));
memset(Sys, 0, sizeof(*Sys));
Sys->zone = aka->zone;
Sys->net = aka->net;
Sys->node = aka->node;

View File

@ -245,7 +245,7 @@ void html_massage(char *inbuf, char *outbuf, size_t size)
char *inptr = inbuf;
char *outptr = outbuf;
memset(outbuf, 0, sizeof(outbuf));
memset(outbuf, 0, sizeof(*outbuf));
while (*inptr) {

View File

@ -862,7 +862,7 @@ node *getnlent(faddr *addr)
* Parse the IP flag for a optional port number.
*/
if ((r = strrchr(p, ':'))) {
*r++;
r++;
for (tmps = &nl_service; *tmps; tmps=&((*tmps)->next)) {
if (strncmp(p, (*tmps)->flag, 3) == 0) {
/*

View File

@ -88,7 +88,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
newname = calloc(PATH_MAX, sizeof(char));
strcpy(newname, filename);
p = strrchr(newname, '.');
*p++;
p++;
*p = '\0';
if (!getarchiver(arctype)) {

View File

@ -161,7 +161,7 @@ int clam_stream_check(char *servname, char *servport, char *filename)
/* fwrite(buf, 1, buf_len, stderr); */
buf_c = buf + buf_len;
while(*buf_c=='\r' || *buf_c == '\r' || *buf_c == ' ')
*buf_c --;
buf_c --;
if (buf_c - buf >= sizeof(" FOUND") && strncasecmp(buf_c - sizeof(" FOUND"), " FOUND", sizeof(" FOUND")-1) == 0) {
char *buf_s = buf;
buf_c -= sizeof(" FOUND");

View File

@ -175,7 +175,7 @@ char *mkemsidat(int caller)
p=xstrcat(p,(char *)"ZAP,");
if (emsi_local_protos & PROT_ZMO)
p=xstrcat(p,(char *)"ZMO,");
if (emsi_local_protos & PROT_DZA);
if (emsi_local_protos & PROT_DZA)
p=xstrcat(p,(char *)"DZA,");
if (emsi_local_protos & PROT_KER)
p=xstrcat(p,(char *)"KER,");

View File

@ -491,9 +491,9 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
}
for (tmpf = st; tmpf; tmpf = tmpf->next)
Syslog('o',"flist: \"%s\" -> \"%s\" dsp:%d flofp:%u floff:%u",
Syslog('o',"flist: \"%s\" -> \"%s\" dsp:%d flofp:%p floff:%p",
MBSE_SS(tmpf->local), MBSE_SS(tmpf->remote), tmpf->disposition,
(unsigned int)tmpf->flofp, (unsigned int)tmpf->floff);
tmpf->flofp, tmpf->floff);
return st;
}

View File

@ -305,7 +305,7 @@ void Send(int newsmode, char *outstr)
int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int flags, FILE *pkt)
{
int rrq, result = 1, waskludge = FALSE, badkludge;
int bNeedToGetAddressFromMsgid = (int)NULL, newsmode = 0, lines, pass, count, first;
int bNeedToGetAddressFromMsgid = 0, newsmode = 0, lines, pass, count, first;
char *newsgroup = NULL, *charset = NULL;
char *temp, *p, *q, *r, *l, *b, *To = NULL, buf[4096], c, MailFrom[128], MailTo[128];
time_t now;

View File

@ -69,7 +69,7 @@ void MacroRead(FILE *fi, FILE *fp)
/*
* Empty lines are just written
*/
fprintf(fp, "\r");
fprintf(fp, "\n");
} else {
strncpy(temp, ParseMacro(line,&res), 254);
if (res)
@ -78,7 +78,7 @@ void MacroRead(FILE *fi, FILE *fp)
* Only output if something was evaluated
*/
if (strlen(temp))
fprintf(fp, "%s\r", temp);
fprintf(fp, "%s\n", temp);
}
}
}

View File

@ -406,7 +406,7 @@ int get_post(char *buf, int max)
int c, len;
len = 0;
memset(buf, 0, sizeof(buf));
memset(buf, 0, sizeof(*buf));
while (TRUE) {
c = tty_getc(180);
if (c <= 0) {

View File

@ -263,7 +263,7 @@ int get_nntp(char *buf, int max)
int c, len;
len = 0;
memset(buf, 0, sizeof(buf));
memset(buf, 0, sizeof(*buf));
while (TRUE) {
c = tty_getc(180);
if (c <= 0) {

View File

@ -1042,7 +1042,7 @@ void Choose_Mailbox(char *Option)
SetEmailArea((char *)"trash");
else if (!strcmp(sMailbox, "trash"))
SetEmailArea((char *)"archive");
else if (!strcmp(sMailbox, "archive"));
else if (!strcmp(sMailbox, "archive"))
SetEmailArea((char *)"mailbox");
}
Syslog('+', "Emailarea: %s", sMailbox);

View File

@ -328,7 +328,7 @@ void DoMenu(int Type)
case 7:
/* Run external program */
if (strlen(menus.DoorName) && !menus.HideDoor) {
memset(temp, 0, sizeof(temp));
memset(temp, 0, sizeof(*temp));
strcpy(temp, menus.DoorName);
ExtDoor(menus.OptionalData, menus.NoDoorsys, menus.Y2Kdoorsys, menus.Comport,
menus.NoSuid, menus.NoPrompt, menus.SingleUser, temp);

View File

@ -474,7 +474,7 @@ void ImportOneline(void)
mbse_mvprintw(5, 6, "8.7.3 IMPORT ONELINERS");
set_color(CYAN, BLACK);
temp = calloc(PATH_MAX, sizeof(char));
memset(temp, 0, sizeof(temp));
memset(temp, 0, sizeof(*temp));
strcpy(temp, edit_str(21, 6,64, temp, (char *)"The ^full path and filename^ of the file to import"));
if (strlen(temp) == 0) {
free(temp);

View File

@ -84,7 +84,7 @@ void fill_portlist(pp_list **fdp, pp_list *new)
pp_list *tmp, *ta;
tmp = (pp_list *)malloc(sizeof(pp_list));
memset(tmp, 0, sizeof(tmp));
memset(tmp, 0, sizeof(*tmp));
tmp->next = NULL;
strncpy(tmp->tty, new->tty, 6);
tmp->mflags = new->mflags;

View File

@ -14,6 +14,7 @@ all:
clean:
rm -f core filelist Makefile.bak
rm -f editor
install:
@if [ "`id -un`" != "root" ] ; then \

View File

@ -35,11 +35,11 @@ case "$1" in
rm -f $MBSE_ROOT/var/sema/*
rm -f $MBSE_ROOT/var/*.LCK
rm -f $MBSE_ROOT/tmp/mb*
su mbse -c '$MBSE_ROOT/bin/mbtask' >/dev/null
su -m mbse -c '$MBSE_ROOT/bin/mbtask' >/dev/null
echo -n "mbtask "
sleep 2
if [ -f $MBSE_ROOT/etc/config.data ]; then
su mbse -c '$MBSE_ROOT/bin/mbstat open -quiet'
su -m mbse -c '$MBSE_ROOT/bin/mbstat open -quiet'
echo -n "opened "
fi
echo "done."
@ -48,7 +48,7 @@ case "$1" in
echo -n "Stopping $DESC: "
if [ -f $MBSE_ROOT/var/run/mbtask ]; then
echo -n "logoff users "
su mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null
su -m mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null
echo -n " stopping mbtask"
pid=$( cat $MBSE_ROOT/var/run/mbtask )
kill $pid

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);