Marked all fmt + va_list functions with format attribute so GCC/Clang can warn about them. Not ignoring -Wsuggest-attribute=format anymore for GCC/Clang.

This commit is contained in:
omar
2017-08-25 16:10:14 +08:00
parent 40f608ce9b
commit 37f3a718c6
4 changed files with 48 additions and 45 deletions

View File

@ -2298,7 +2298,7 @@ struct ExampleAppConsole
ScrollToBottom = true;
}
void AddLog(const char* fmt, ...) IM_PRINTFARGS(2)
void AddLog(const char* fmt, ...) IM_FMTARGS(2)
{
char buf[1024];
va_list args;
@ -2560,7 +2560,7 @@ struct ExampleAppLog
void Clear() { Buf.clear(); LineOffsets.clear(); }
void AddLog(const char* fmt, ...) IM_PRINTFARGS(2)
void AddLog(const char* fmt, ...) IM_FMTARGS(2)
{
int old_size = Buf.size();
va_list args;