Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 77693c6c authored by rswindell's avatar rswindell

Fixed gcc -Wall warnings.

parent 7efe02ed
......@@ -65,7 +65,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
sprintf(from,"%.128s@%.128s"
,msg->from,faddrtoa((faddr_t *)msg->from_net.addr,tmp));
else if(msg->from_net.type==NET_INTERNET)
sprintf(from,"%.128s",msg->from_net.addr);
sprintf(from,"%.128s",(char*)msg->from_net.addr);
else
sprintf(from,"%.128s@%.128s",msg->from,msg->from_net.addr);
if(strlen(from)>25) {
......@@ -82,7 +82,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
if(msg->to_net.type==NET_FIDO)
sprintf(to,"%.128s@%s",msg->to,faddrtoa((faddr_t *)msg->to_net.addr,tmp));
else if(msg->to_net.type==NET_INTERNET)
sprintf(to,"%.128s",msg->to_net.addr);
sprintf(to,"%.128s",(char*)msg->to_net.addr);
else if(msg->to_net.type==NET_QWK) {
if(mode&TO_QNET) {
p=strchr((char *)msg->to_net.addr,'/');
......@@ -95,9 +95,9 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
else
sprintf(to,"%.128s",msg->to); }
else
sprintf(to,"%.128s@%.128s",msg->to,msg->to_net.addr); }
sprintf(to,"%.128s@%.128s",msg->to,(char*)msg->to_net.addr); }
else
sprintf(to,"%.128s@%.128s",msg->to,msg->to_net.addr);
sprintf(to,"%.128s@%.128s",msg->to,(char*)msg->to_net.addr);
if(strlen(to)>25) {
sprintf(str,"To: %.128s\xe3\xe3",to);
fwrite(str,strlen(str),1,qwk_fp);
......@@ -110,7 +110,7 @@ ulong sbbs_t::msgtoqwk(smbmsg_t* msg, FILE *qwk_fp, long mode, int subnum
sprintf(to,"%.128s",msg->to);
if(msg->from_net.type==NET_QWK && mode&VIA && !msg->forwarded) {
sprintf(str,"@VIA:%.128s\xe3",msg->from_net.addr);
sprintf(str,"@VIA:%.128s\xe3",(char*)msg->from_net.addr);
fwrite(str,strlen(str),1,qwk_fp);
size+=strlen(str); }
......
......@@ -50,7 +50,7 @@ const char *scfgnulstr="";
BOOL allocerr(char* error, long offset, char *fname, uint size)
{
sprintf(error,"offset %d in %s, allocating %u bytes of memory"
sprintf(error,"offset %ld in %s, allocating %u bytes of memory"
,offset,fname,size);
return(FALSE);
}
......@@ -75,7 +75,7 @@ BOOL read_node_cfg(scfg_t* cfg, char* error)
get_int(cfg->node_num,instream);
if(!cfg->node_num) {
sprintf(error,"offset %d in %s, Node number must be non-zero"
sprintf(error,"offset %ld in %s, Node number must be non-zero"
,offset,fname);
return(FALSE);
}
......@@ -515,7 +515,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
#ifdef SBBS
for(j=0;j<i;j++)
if(cfg->sub[i]->ptridx==cfg->sub[j]->ptridx) {
sprintf(error,"offset %u in %s: Duplicate pointer index for subs #%d and #%d"
sprintf(error,"offset %ld in %s: Duplicate pointer index for subs #%d and #%d"
,offset,fname
,i+1,j+1);
return(FALSE);
......
......@@ -1047,7 +1047,7 @@ bool sbbs_t::spy(uint i /* node_num */)
}
ansi_len=0;
}
if(ansi_len && ansi_len<sizeof(ansi_seq)-2) {
if(ansi_len && ansi_len<(int)sizeof(ansi_seq)-2) {
if(ansi_len==1) {
if(ch=='[') {
ansi_seq[ansi_len++]=ch;
......
......@@ -263,7 +263,7 @@ bool sbbs_t::unpack_rep(char* repfile)
k--; /* k is sub */
if(j>=usrgrps || k>=usrsubs[j] || cfg.sub[usrsub[j][k]]->qwkconf) {
bprintf(text[QWKInvalidConferenceN],n);
sprintf(str,"%s: Invalid conference number %d",useron.alias,n);
sprintf(str,"%s: Invalid conference number %lu",useron.alias,n);
logline("P!",str);
continue; } }
......
......@@ -514,7 +514,7 @@ int SMBCALL smb_getmsgidx(smb_t* smb, smbmsg_t* msg)
return(1);
}
if(bot==top-1 && idx.number!=msg->hdr.number) {
sprintf(smb->last_error,"msg %d not found",msg->hdr.number);
sprintf(smb->last_error,"msg %ld not found",msg->hdr.number);
return(1);
}
if(idx.number>msg->hdr.number) {
......@@ -939,7 +939,7 @@ int SMBCALL smb_addcrc(smb_t* smb, ulong crc)
if((buf=(ulong*)MALLOC(smb->status.max_crcs*4))==NULL) {
close(file);
sprintf(smb->last_error
,"malloc failure of %d bytes"
,"malloc failure of %ld bytes"
,smb->status.max_crcs*4);
return(-3);
}
......@@ -1080,7 +1080,7 @@ int SMBCALL smb_putmsghdr(smb_t* smb, smbmsg_t* msg)
}
clearerr(smb->shd_fp);
if(fseek(smb->shd_fp,msg->idx.offset,SEEK_SET)) {
sprintf(smb->last_error,"seeking to %d in index",msg->idx.offset);
sprintf(smb->last_error,"seeking to %ld in index",msg->idx.offset);
return(-1);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment