]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
myasprintf: mark as printf like for compilation checks
authorBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 28 Oct 2021 12:00:34 +0000 (14:00 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 28 Oct 2021 12:00:34 +0000 (14:00 +0200)
include/memory.h

index b6c1eb1c116dbb040488d84e8a0367ec62421738..900f37caa19188592df4e14c0066b560ff013202 100644 (file)
@@ -29,7 +29,7 @@ void *__myrealloc(const char *file, int line, void *ptr, size_t size);
 void __myfree(const char *file, int line, void *ptr);
 char *__mystrdup(const char *file, int line, const char *str);
 char *__mystrndup(const char *file, int line, const char *str, size_t len);
-int __myasprintf(const char *file, int line, char **ret, const char *fmt, ...);
+int __myasprintf(const char *file, int line, char **ret, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
 
 #define mymalloc(s) __mymalloc(__FILE__, __LINE__, s)
 #define myrealloc(p,s) __myrealloc(__FILE__, __LINE__, p, s)