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

Can't use enum as last arg before varargs apparently

This should fix the Clang warning that Deuce reported:
str.cpp:131:18: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior
parent 5ca9c87b
No related branches found
No related tags found
No related merge requests found
Pipeline #5330 failed
...@@ -744,7 +744,7 @@ public: ...@@ -744,7 +744,7 @@ public:
/* str.cpp */ /* str.cpp */
char format_text_buf[256]{}; char format_text_buf[256]{};
char* format_text(enum text, ...); char* format_text(int /* enum text */, ...);
char* format_text(enum text, smbmsg_t*, ...); char* format_text(enum text, smbmsg_t*, ...);
int get_text_num(const char* id); int get_text_num(const char* id);
const char* get_text(const char* id); const char* get_text(const char* id);
......
...@@ -123,7 +123,7 @@ bool sbbs_t::load_user_text(void) ...@@ -123,7 +123,7 @@ bool sbbs_t::load_user_text(void)
return replace_text(path); return replace_text(path);
} }
char* sbbs_t::format_text(enum text num, ...) char* sbbs_t::format_text(int /* enum text */ num, ...)
{ {
expand_atcodes(text[num], format_text_buf, sizeof format_text_buf, /* remsg: */NULL); expand_atcodes(text[num], format_text_buf, sizeof format_text_buf, /* remsg: */NULL);
if(strcmp(text[num], format_text_buf) == 0) { // No @-codes expanded if(strcmp(text[num], format_text_buf) == 0) { // No @-codes expanded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment