From: Baptiste Daroussin Date: Thu, 28 Oct 2021 12:00:34 +0000 (+0200) Subject: myasprintf: mark as printf like for compilation checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3df04cb1d74175d2acc29fdf6b4dcd4621fe5787;p=thirdparty%2Fmlmmj.git myasprintf: mark as printf like for compilation checks --- diff --git a/include/memory.h b/include/memory.h index b6c1eb1c..900f37ca 100644 --- a/include/memory.h +++ b/include/memory.h @@ -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)