mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:47:45 +00:00
LibC+Utilities: Add gnu::format
attributes
Without these attributes present on these custom formatting functions, Clang would warn use about nonliteral format strings. As an added bonus, we now get type checking on these.
This commit is contained in:
parent
e8e628de57
commit
98260c5862
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ char* optarg = nullptr;
|
|||
// processed". Well, this is how we do it.
|
||||
static size_t s_index_into_multioption_argument = 0;
|
||||
|
||||
static inline void report_error(const char* format, ...)
|
||||
[[gnu::format(printf, 1, 2)]] static inline void report_error(const char* format, ...)
|
||||
{
|
||||
if (!opterr)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue