Add a special attribute to printf-like funcs

Enables extra compile-time checks

CL: none

PUBLISHED_FROM=9f7d658fbda5c721cf40293bf29967bb056d0437
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2018-04-13 17:12:06 +00:00
1 parent 43191db63e
commit 43b5a4e735
4 files changed
+28 -14

No files matched your search

+1 -5
View File
@@ -547,11 +547,7 @@ void cs_log_set_file(FILE *file);
* Prints log to the current log file, appends "\n" in the end and flushes the
* stream.
*/
void cs_log_printf(const char *fmt, ...)
#ifdef __GNUC__
__attribute__((format(printf, 1, 2)))
#endif
;
void cs_log_printf(const char *fmt, ...) PRINTF_LIKE(1, 2);
/*
* Format and print message `x` with the given level `l`. Example: