diff options
Diffstat (limited to 'include/base')
-rw-r--r-- | include/base/ereport.h | 7 | ||||
-rw-r--r-- | include/base/util.h | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/include/base/ereport.h b/include/base/ereport.h index fe096750..a097a939 100644 --- a/include/base/ereport.h +++ b/include/base/ereport.h @@ -60,7 +60,12 @@ NSPR_BEGIN_EXTERN_C * the current date. */ -NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...); +NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 2, 3))); +#else + ; +#endif NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args); NSPR_END_EXTERN_C diff --git a/include/base/util.h b/include/base/util.h index fa3614ac..3302a1cf 100644 --- a/include/base/util.h +++ b/include/base/util.h @@ -67,12 +67,22 @@ NSAPI_PUBLIC int INTutil_itoa(int i, char *a); NSAPI_PUBLIC int INTutil_vsprintf(char *s, register const char *fmt, va_list args); -NSAPI_PUBLIC int INTutil_sprintf(char *s, const char *fmt, ...); +NSAPI_PUBLIC int INTutil_sprintf(char *s, const char *fmt, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 2, 3))); +#else + ; +#endif NSAPI_PUBLIC int INTutil_vsnprintf(char *s, int n, register const char *fmt, va_list args); -NSAPI_PUBLIC int INTutil_snprintf(char *s, int n, const char *fmt, ...); +NSAPI_PUBLIC int INTutil_snprintf(char *s, int n, const char *fmt, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 3, 4))); +#else + ; +#endif NSAPI_PUBLIC int INTutil_strftime(char *s, const char *format, const struct tm *t); |