Skip to content
Snippets Groups Projects
Commit fa641a66 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix recently introduced warnings reported by GCC.

parent 62a788ca
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #994 passed
...@@ -1438,10 +1438,10 @@ bool sbbs_t::forwardmail(smbmsg_t* orgmsg, const char* to, const char* subject, ...@@ -1438,10 +1438,10 @@ bool sbbs_t::forwardmail(smbmsg_t* orgmsg, const char* to, const char* subject,
time32_t now32 = time32(NULL); time32_t now32 = time32(NULL);
smb_hfield(&msg, FORWARDED, sizeof(now32), &now32); smb_hfield(&msg, FORWARDED, sizeof(now32), &now32);
char* br = NULL; const char* br = NULL;
char* pg = nulstr; const char* pg = nulstr;
char* lt = "<"; const char* lt = "<";
char* gt = ">"; const char* gt = ">";
if(orgmsg->text_subtype != NULL && stricmp(orgmsg->text_subtype, "html") == 0) { if(orgmsg->text_subtype != NULL && stricmp(orgmsg->text_subtype, "html") == 0) {
lt = "&lt;"; lt = "&lt;";
gt = "&gt;"; gt = "&gt;";
......
...@@ -327,7 +327,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -327,7 +327,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
lfexpand(str,misc); lfexpand(str,misc);
write(file,str,strlen(str)); write(file,str,strlen(str));
safe_snprintf(str, sizeof(str), "%lu\n%s\n%lu\n%ld\n%u\n%u\n%u\n%ld\n%u\n" safe_snprintf(str, sizeof(str), "%lu\n%s\n%lu\n%ld\n%u\n%u\n%u\n%d\n%u\n"
,useron.cdt+useron.freecdt /* Gold */ ,useron.cdt+useron.freecdt /* Gold */
,unixtodstr(&cfg,useron.laston,tmp) /* User last on date */ ,unixtodstr(&cfg,useron.laston,tmp) /* User last on date */
,cols /* User screen width */ ,cols /* User screen width */
...@@ -523,7 +523,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -523,7 +523,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
*(p++)=0; *(p++)=0;
else else
p=nulstr; p=nulstr;
safe_snprintf(str, sizeof(str), "%s\n%s\n%s\n%ld\n%u\n%lu\n" safe_snprintf(str, sizeof(str), "%s\n%s\n%s\n%d\n%u\n%lu\n"
,tmp /* User's firstname */ ,tmp /* User's firstname */
,p /* User's lastname */ ,p /* User's lastname */
,useron.location /* User's city */ ,useron.location /* User's city */
...@@ -870,7 +870,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -870,7 +870,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
l=0L; l=0L;
write(file,&l,4); /* Memorized message number */ write(file,&l,4); /* Memorized message number */
safe_snprintf(str, sizeof(str), "%d%c%c%ld%s%c%c%d%d%d%c%c" safe_snprintf(str, sizeof(str), "%d%c%c%d%s%c%c%d%d%d%c%c"
,cfg.com_port /* COM Port number */ ,cfg.com_port /* COM Port number */
,' ' /* Reserved */ ,' ' /* Reserved */
,' ' /* "" */ ,' ' /* "" */
...@@ -1103,7 +1103,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -1103,7 +1103,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
return; return;
} }
safe_snprintf(str, sizeof(str), "%s\n%ld\n%d\n%lu\n%lu\n%u\n%lu\n" safe_snprintf(str, sizeof(str), "%s\n%d\n%d\n%lu\n%lu\n%u\n%lu\n"
,name /* Complete name of user */ ,name /* Complete name of user */
,INT_TO_BOOL(term & ANSI) /* ANSI ? */ ,INT_TO_BOOL(term & ANSI) /* ANSI ? */
,!INT_TO_BOOL(term & NO_EXASCII) /* IBM characters ? */ ,!INT_TO_BOOL(term & NO_EXASCII) /* IBM characters ? */
...@@ -1171,7 +1171,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl ...@@ -1171,7 +1171,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
} }
safe_snprintf(str, sizeof(str), "%d\n%d\n%lu\n%s%c\n%d\n%s\n%s\n%d\n%ld\n" safe_snprintf(str, sizeof(str), "%d\n%d\n%lu\n%s%c\n%d\n%s\n%s\n%d\n%ld\n"
"%ld\n%d\n" "%d\n%d\n"
,misc&(XTRN_STDIO|XTRN_CONIO) ? 0 /* Local */ : 2 /* Telnet */ ,misc&(XTRN_STDIO|XTRN_CONIO) ? 0 /* Local */ : 2 /* Telnet */
,misc&(XTRN_STDIO|XTRN_CONIO) ? INVALID_SOCKET : client_socket_dup ,misc&(XTRN_STDIO|XTRN_CONIO) ? INVALID_SOCKET : client_socket_dup
,dte_rate ,dte_rate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment