Commit bf9aa4f7 authored by rswindell's avatar rswindell
Browse files

Fixed gcc printf format warnings on Linux (sigh).

parent 4eb032b6
......@@ -141,13 +141,13 @@ char* sbbs_t::atcode(char* sp, char* str)
up=0;
char days[64]="";
if((up/(24*60*60))>=2) {
sprintf(days,"%u days ",up/(24*60*60));
sprintf(days,"%lu days ",(ulong)(up/(24L*60L*60L)));
up%=(24*60*60);
}
sprintf(str,"%s%u:%02u"
sprintf(str,"%s%lu:%02lu"
,days
,up/(60*60)
,(up/60)%60
,(ulong)(up/(60L*60L))
,(ulong)((up/60L)%60L)
);
return(str);
}
......@@ -384,7 +384,7 @@ char* sbbs_t::atcode(char* sp, char* str)
if(!strcmp(sp,"TIMEON") || !strcmp(sp,"TIMEUSED")) {
now=time(NULL);
sprintf(str,"%lu",(now-logontime)/60L);
sprintf(str,"%lu",(ulong)(now-logontime)/60L);
return(str);
}
......
......@@ -1503,7 +1503,7 @@ void event_thread(void* arg)
delfiles(sbbs->cfg.temp_dir,ALLFILES);
if(sbbs->unpack_qwk(str,i)==false) {
char newname[MAX_PATH+1];
sprintf(newname,"%s.%x.bad",str,now);
sprintf(newname,"%s.%lx.bad",str,(long)now);
remove(newname);
if(rename(str,newname)==0) {
char logmsg[MAX_PATH*3];
......
......@@ -396,10 +396,10 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft
lfexpand(str,misc);
write(file,str,strlen(str));
sprintf(str,"%s\n%s\n%x\n%s\n%s\n%s\n"
sprintf(str,"%s\n%s\n%lx\n%s\n%s\n%s\n"
,ltoaf(useron.exempt,tmp) /* Exemptions */
,ltoaf(useron.rest,tmp2) /* Restrictions */
,useron.expire /* Expiration date in unix form */
,(long)useron.expire /* Expiration date in unix form */
,useron.address /* Address */
,useron.location /* City/State */
,useron.zipcode /* Zip/Postal code */
......@@ -1132,7 +1132,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft
l=((((long)tm.tm_hour*60L)+(long)tm.tm_min)*60L)
+(long)tm.tm_sec;
sprintf(str,"%s\n%s\n%u\n%u\n%u\n%u\n%lu\n%u\n%s\n"
sprintf(str,"%s\n%s\n%u\n%u\n%u\n%u\n%lu\n%lu\n%s\n"
"%s\n%s\n%lu\n%s\n%u\n%u\n%u\n%u\n%u\n%lu\n%u\n"
"%lu\n%lu\n%s\n%s\n"
,dropdir
......@@ -1142,7 +1142,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft
,useron.dls /* Total downloads */
,cfg.level_timepercall[useron.level]/* Minutes allowed this call */
,l /* Secs since midnight (logon) */
,starttime-logontime /* Extra time in seconds */
,(long)(starttime-logontime) /* Extra time in seconds */
,"FALSE" /* Sysop next? */
,"FALSE" /* From Front-end? */
,"FALSE" /* Software Flow Control? */
......
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