Remove EVUTIL_CHECK_FMT.

This was never supposed to be an exposed API, so its name should have been
more like _EVUTIL_CHECK_FMT.  But it was only used in one place, so let's
just eliminate it.
This commit is contained in:
Nick Mathewson 2010-02-03 01:22:44 -05:00
parent f6b269498a
commit 6c21c895d9

View File

@ -296,20 +296,14 @@ struct timezone;
int evutil_gettimeofday(struct timeval *tv, struct timezone *tz); int evutil_gettimeofday(struct timeval *tv, struct timezone *tz);
#endif #endif
#ifdef __GNUC__
/** Helper macro; used to tell the compiler that a given function takes a
* printf-like format string as argument number 'a', and a set of printf-like
* arguments starting in argument 'b'. */
#define EVUTIL_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
#else
#define EVUTIL_CHECK_FMT(a,b)
#endif
/** Replacement for snprintf to get consistent behavior on platforms for /** Replacement for snprintf to get consistent behavior on platforms for
which the return value of snprintf does not conform to C99. which the return value of snprintf does not conform to C99.
*/ */
int evutil_snprintf(char *buf, size_t buflen, const char *format, ...) int evutil_snprintf(char *buf, size_t buflen, const char *format, ...)
EVUTIL_CHECK_FMT(3,4); #ifdef __GNUC__
__attribute__((format(printf, 3, 4)))
#endif
;
int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap); int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap);
/** Replacement for inet_ntop for platforms which lack it. */ /** Replacement for inet_ntop for platforms which lack it. */