Commit 9405250f authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix newly-introduced GCC warnings

parent 1cac2c8a
...@@ -1132,7 +1132,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool ...@@ -1132,7 +1132,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return sectostr(useron.textra, str) + 3; return sectostr(useron.textra, str) + 3;
if(strcmp(sp, "MBANKED") == 0) { if(strcmp(sp, "MBANKED") == 0) {
safe_snprintf(str, maxlen, "%lu", useron.min); safe_snprintf(str, maxlen, "%" PRIu32, useron.min);
return str; return str;
} }
...@@ -1262,7 +1262,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool ...@@ -1262,7 +1262,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
} }
if(!strcmp(sp,"KBLEFT")) { if(!strcmp(sp,"KBLEFT")) {
safe_snprintf(str,maxlen,"%" PRIu64,(useron.cdt+useron.freecdt)/1024ULL); safe_snprintf(str,maxlen,"%" PRIu64,(useron.cdt+useron.freecdt)/1024UL);
return(str); return(str);
} }
...@@ -1716,11 +1716,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool ...@@ -1716,11 +1716,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
else if(!strcmp(sp,"ULS")) else if(!strcmp(sp,"ULS"))
safe_snprintf(str,maxlen,"%lu", (ulong)stats.uls); safe_snprintf(str,maxlen,"%lu", (ulong)stats.uls);
else if(!strcmp(sp,"ULB")) else if(!strcmp(sp,"ULB"))
safe_snprintf(str,maxlen,"%" PRIu64, stats.ulb); safe_snprintf(str,maxlen,"%" PRIu32, stats.ulb);
else if(!strcmp(sp,"DLS")) else if(!strcmp(sp,"DLS"))
safe_snprintf(str,maxlen,"%lu", (ulong)stats.dls); safe_snprintf(str,maxlen,"%lu", (ulong)stats.dls);
else if(!strcmp(sp,"DLB")) else if(!strcmp(sp,"DLB"))
safe_snprintf(str,maxlen,"%" PRIu64, stats.dlb); safe_snprintf(str,maxlen,"%" PRIu32, stats.dlb);
else if(!strcmp(sp,"PTODAY")) else if(!strcmp(sp,"PTODAY"))
safe_snprintf(str,maxlen,"%lu", (ulong)stats.ptoday); safe_snprintf(str,maxlen,"%lu", (ulong)stats.ptoday);
else if(!strcmp(sp,"ETODAY")) else if(!strcmp(sp,"ETODAY"))
......
...@@ -413,7 +413,7 @@ void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del) ...@@ -413,7 +413,7 @@ void sbbs_t::download_msg_attachments(smb_t* smb, smbmsg_t* msg, bool del)
if(length<1) if(length<1)
bprintf(text[FileDoesNotExist], tp); bprintf(text[FileDoesNotExist], tp);
else if(!(useron.exempt&FLAG('T')) && cur_cps && !SYSOP else if(!(useron.exempt&FLAG('T')) && cur_cps && !SYSOP
&& length/cur_cps>(time_t)timeleft) && (ulong)(length/cur_cps)>timeleft)
bputs(text[NotEnoughTimeToDl]); bputs(text[NotEnoughTimeToDl]);
else { else {
char tmp[512]; char tmp[512];
......
...@@ -1280,7 +1280,7 @@ int edit_security(scfg_t *cfg, user_t *user) ...@@ -1280,7 +1280,7 @@ int edit_security(scfg_t *cfg, user_t *user)
sprintf(opt[i++],"Restrictions %s",ltoaf(user->rest,str)); sprintf(opt[i++],"Restrictions %s",ltoaf(user->rest,str));
sprintf(opt[i++],"Credits %" PRIu64,user->cdt); sprintf(opt[i++],"Credits %" PRIu64,user->cdt);
sprintf(opt[i++],"Free Credits %" PRIu64,user->freecdt); sprintf(opt[i++],"Free Credits %" PRIu64,user->freecdt);
sprintf(opt[i++],"Minutes %lu",user->min); sprintf(opt[i++],"Minutes %" PRIu32,user->min);
opt[i][0]=0; opt[i][0]=0;
switch(uifc.list(WIN_MID|WIN_ACT,0,0,0,&j,0,"Security Settings",opt)) { switch(uifc.list(WIN_MID|WIN_ACT,0,0,0,&j,0,"Security Settings",opt)) {
case -1: case -1:
...@@ -1389,7 +1389,7 @@ int edit_security(scfg_t *cfg, user_t *user) ...@@ -1389,7 +1389,7 @@ int edit_security(scfg_t *cfg, user_t *user)
case 10: case 10:
/* Minutes */ /* Minutes */
GETUSERDAT(cfg,user); GETUSERDAT(cfg,user);
sprintf(str,"%lu",user->min); sprintf(str,"%" PRIu32,user->min);
uifc.input(WIN_MID|WIN_ACT|WIN_SAV,0,0,"Minutes",str,10,K_EDIT|K_NUMBER); uifc.input(WIN_MID|WIN_ACT|WIN_SAV,0,0,"Minutes",str,10,K_EDIT|K_NUMBER);
if(uifc.changes) { if(uifc.changes) {
user->min=strtoul(str,NULL,10); user->min=strtoul(str,NULL,10);
......
...@@ -440,7 +440,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -440,7 +440,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
fwrite(str,strlen(str),1,fp); fwrite(str,strlen(str),1,fp);
localtime_r(&ns_time,&tm); localtime_r(&ns_time,&tm);
safe_snprintf(str, sizeof(str), "%c\n%c\n%u\n%lu\n%02d/%02d/%02d\n" safe_snprintf(str, sizeof(str), "%c\n%c\n%u\n%" PRIu32 "\n%02d/%02d/%02d\n"
,(term & (NO_EXASCII|ANSI|COLOR)) == ANSI ,(term & (NO_EXASCII|ANSI|COLOR)) == ANSI
? 'Y':'N' /* 39: ANSI supported but NG mode */ ? 'Y':'N' /* 39: ANSI supported but NG mode */
,'Y' /* 40: Use record locking */ ,'Y' /* 40: Use record locking */
......
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