From: Ken Raeburn Date: Fri, 29 Jun 2007 01:55:08 +0000 (+0000) Subject: Under gcc, declare k5_v?asprintf with format attribute X-Git-Tag: krb5-1.7-alpha1~1040 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d5aa03bb1256279569d8e825e3a7531b2dd2f32;p=krb5.git Under gcc, declare k5_v?asprintf with format attribute git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19654 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h index b1b078108..2339e6354 100644 --- a/src/include/k5-platform.h +++ b/src/include/k5-platform.h @@ -793,6 +793,14 @@ vsnprintf(char *str, size_t size, const char *format, va_list args) #endif /* win32? */ #endif /* no vsnprintf */ #ifndef HAVE_VASPRINTF + +#if !defined(__cplusplus) && (__GNUC__ > 2) +static inline int k5_vasprintf(char **, const char *, va_list) + __attribute__((__format__(__printf__, 2, 0))); +static inline int k5_asprintf(char **, const char *, ...) + __attribute__((__format__(__printf__, 2, 3))); +#endif + #define vasprintf k5_vasprintf /* On error: BSD: Set *ret to NULL. GNU: *ret is undefined.