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

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

parent 639b9446
......@@ -485,7 +485,7 @@ BOOL DLLCALL removefiledat(scfg_t* cfg, file_t* f)
/****************************************************************************/
BOOL DLLCALL findfile(scfg_t* cfg, uint dirnum, char *filename)
{
char str[256],c,fname[13],HUGE16 *ixbbuf;
char str[256],fname[13],HUGE16 *ixbbuf;
int i,file;
long length,l;
......
......@@ -83,10 +83,6 @@ int dns_getmx(char* name, char* mx, char* mx2
#define STATUS_WFC "Listening"
static const char *wday[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
static const char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
,"Jul","Aug","Sep","Oct","Nov","Dec"};
static mail_startup_t* startup=NULL;
static scfg_t scfg;
static SOCKET server_socket=INVALID_SOCKET;
......
......@@ -175,7 +175,7 @@ char* DLLCALL prep_file_desc(char *str)
char *ultoac(ulong l, char *string)
{
char str[256];
char i,j,k;
int i,j,k;
ultoa(l,str,10);
i=strlen(str)-1;
......
......@@ -857,8 +857,8 @@ char *readline_alloc(long *offset, char *outstr, int maxline, FILE *instream)
/****************************************************************************/
long aftol(char *str)
{
char c=0;
ulong l=0UL;
int c=0;
ulong l=0UL;
strupr(str);
while(str[c]) {
......@@ -873,7 +873,7 @@ long aftol(char *str)
/*****************************************************************************/
char *ltoaf(long l,char *str)
{
char c=0;
int c=0;
while(c<26) {
if(l&(long)(1L<<c))
......
......@@ -52,9 +52,9 @@ char* nulstr="";
/****************************************************************************/
uint DLLCALL matchuser(scfg_t* cfg, char *name, BOOL sysop_alias)
{
int file;
int file,c;
char dat[LEN_ALIAS+2];
char str[256],c;
char str[256];
ulong l,length;
FILE *stream;
......@@ -486,9 +486,9 @@ int DLLCALL putuserdat(scfg_t* cfg, user_t* user)
/****************************************************************************/
char* DLLCALL username(scfg_t* cfg, int usernumber,char *strin)
{
char str[256];
char c;
int file;
char str[256];
int c;
int file;
if(usernumber<1) {
strin[0]=0;
......@@ -1153,8 +1153,8 @@ BOOL DLLCALL chk_ar(scfg_t* cfg, uchar *ar, user_t* user)
/****************************************************************************/
int DLLCALL getuserrec(scfg_t* cfg, int usernumber,int start, int length, char *str)
{
char c,path[256];
int i,file;
char path[256];
int i,c,file;
if(!usernumber)
return(-1);
......@@ -1263,9 +1263,9 @@ int DLLCALL putuserrec(scfg_t* cfg, int usernumber,int start, uint length, char
/****************************************************************************/
ulong DLLCALL adjustuserrec(scfg_t* cfg, int usernumber, int start, int length, long adj)
{
char str[256],c,path[256];
char str[256],path[256];
char tmp[32];
int i,file;
int i,c,file;
long val;
node_t node;
......
......@@ -1052,9 +1052,9 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
continue;
}
if(rd>avail)
if(rd>(int)avail)
rd=avail;
if(rd>sizeof(buf))
if(rd>(int)sizeof(buf))
rd=sizeof(buf);
if((rd=read(out_pipe[0],buf,rd))<1) {
......@@ -1120,7 +1120,7 @@ char * sbbs_t::cmdstr(char *instr, char *fpath, char *fspec, char *outstr)
else
cmd=outstr;
len=strlen(instr);
for(i=j=0;i<len && j<sizeof(cmdstr_output);i++) {
for(i=j=0;i<len && j<(int)sizeof(cmdstr_output);i++) {
if(instr[i]=='%') {
i++;
cmd[j]=0;
......@@ -1208,7 +1208,7 @@ char * sbbs_t::cmdstr(char *instr, char *fpath, char *fspec, char *outstr)
strcat(cmd,cfg.shell[useron.shell]->code);
break;
case '&': /* Address of msr */
sprintf(str,"%lu",&fakeriobp);
sprintf(str,"%lu",(DWORD)&fakeriobp);
strcat(cmd,str);
break;
case 'Y':
......
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