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 af6823da authored by rswindell's avatar rswindell

Fixed gcc -Wall warnings (char array subscripts, signed/unsigned compares).

parent 4f8d2a52
...@@ -332,7 +332,7 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode) ...@@ -332,7 +332,7 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode)
if((int)(i=batchflagprompt(dirnum,bf,letter-'A'+1,l/F_IXBSIZE))<1) { if((int)(i=batchflagprompt(dirnum,bf,letter-'A'+1,l/F_IXBSIZE))<1) {
FREE((char *)ixbbuf); FREE((char *)ixbbuf);
FREE((char *)datbuf); FREE((char *)datbuf);
if(i==-1) if((int)i==-1)
return(-1); return(-1);
else else
return(found); } return(found); }
...@@ -770,7 +770,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total ...@@ -770,7 +770,7 @@ int sbbs_t::batchflagprompt(uint dirnum, file_t* bf, uint total
,j+1,cfg.dir[usrdir[ml][j]]->lname); ,j+1,cfg.dir[usrdir[ml][j]]->lname);
SYNC; SYNC;
bprintf(text[MoveToDirPrompt],usrdirs[ml]); bprintf(text[MoveToDirPrompt],usrdirs[ml]);
if((md=getnum(usrdirs[ml]))==-1) if((int)(md=getnum(usrdirs[ml]))==-1)
return(2); return(2);
if(!md) if(!md)
md=usrdirs[ml]-1; md=usrdirs[ml]-1;
...@@ -1134,7 +1134,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode) ...@@ -1134,7 +1134,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
bprintf(text[MoveToLibLstFmt],i+1,cfg.lib[usrlib[i]]->lname); bprintf(text[MoveToLibLstFmt],i+1,cfg.lib[usrlib[i]]->lname);
SYNC; SYNC;
bprintf(text[MoveToLibPrompt],cfg.dir[dirnum]->lib+1); bprintf(text[MoveToLibPrompt],cfg.dir[dirnum]->lib+1);
if((i=getnum(usrlibs))==-1) if((int)(i=getnum(usrlibs))==-1)
continue; continue;
if(!i) if(!i)
i=cfg.dir[dirnum]->lib; i=cfg.dir[dirnum]->lib;
...@@ -1146,7 +1146,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode) ...@@ -1146,7 +1146,7 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
,j+1,cfg.dir[usrdir[i][j]]->lname); ,j+1,cfg.dir[usrdir[i][j]]->lname);
SYNC; SYNC;
bprintf(text[MoveToDirPrompt],usrdirs[i]); bprintf(text[MoveToDirPrompt],usrdirs[i]);
if((j=getnum(usrdirs[i]))==-1) if((int)(j=getnum(usrdirs[i]))==-1)
continue; continue;
if(!j) if(!j)
j=usrdirs[i]-1; j=usrdirs[i]-1;
......
...@@ -51,7 +51,7 @@ BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error) ...@@ -51,7 +51,7 @@ BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error)
FILE *instream; FILE *instream;
if(cfg->size!=sizeof(scfg_t)) { if(cfg->size!=sizeof(scfg_t)) {
sprintf(error,"cfg->size (%d) != sizeof(scfg_t) (%d)" sprintf(error,"cfg->size (%ld) != sizeof(scfg_t) (%d)"
,cfg->size,sizeof(scfg_t)); ,cfg->size,sizeof(scfg_t));
return(FALSE); return(FALSE);
} }
...@@ -105,7 +105,7 @@ BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error) ...@@ -105,7 +105,7 @@ BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error)
fclose(instream); fclose(instream);
if(i<TOTAL_TEXT) { if(i<TOTAL_TEXT) {
sprintf(error,"line %u in %s: Less than TOTAL_TEXT (%u) strings defined in %s." sprintf(error,"line %lu in %s: Less than TOTAL_TEXT (%u) strings defined in %s."
,line,fname ,line,fname
,TOTAL_TEXT,fname); ,TOTAL_TEXT,fname);
return(FALSE); return(FALSE);
......
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