AK: Enable format string warnings for AK printf wrappers

This commit is contained in:
Sahan Fernando 2021-01-12 01:02:37 +11:00 committed by Andreas Kling
parent 9bf76a85c8
commit ccf4368ca5
2 changed files with 2 additions and 2 deletions

View file

@ -244,7 +244,7 @@ public:
return String((const char*)buffer.data(), buffer.size(), should_chomp);
}
static String format(const char*, ...);
static String format(const char*, ...) __attribute__((format(printf, 1, 2)));
static String vformatted(StringView fmtstr, TypeErasedFormatParams);

View file

@ -46,7 +46,7 @@ public:
void append(char);
void append_code_point(u32);
void append(const char*, size_t);
void appendf(const char*, ...);
void appendf(const char*, ...) __attribute__((format(printf, 2, 3)));
void appendvf(const char*, va_list);
void append_escaped_for_json(const StringView&);