#define collecty_string_vformat(s, format, args) \
__collecty_string_vformat(s, sizeof(s), format, args)
+static inline int __collecty_string_vformat(char* s,
+ const size_t length, const char* format, va_list args)
+ __attribute__((format(printf, 3, 0)));
+
static inline int __collecty_string_vformat(char* s,
const size_t length, const char* format, va_list args) {
// Write string to buffer
#define collecty_string_format(s, format, ...) \
__collecty_string_format(s, sizeof(s), format, __VA_ARGS__)
-static inline int __collecty_string_format(char* s, const size_t length, const char* format, ...) {
+static inline int __collecty_string_format(char* s,
+ const size_t length, const char* format, ...)
+ __attribute__((format(printf, 3, 4)));
+
+static inline int __collecty_string_format(char* s,
+ const size_t length, const char* format, ...) {
va_list args;
int r;