diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-14 13:25:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-14 13:25:10 -0400 |
commit | 117e3273dce5f6aa61b1867a64c8345b78dc1620 (patch) | |
tree | 8c120727d9cd8bd873c9b696eff7c3488f66b81a /include/event2/util.h | |
parent | 60f65403412c940f51a10c6e283acea9fe6b79cf (diff) | |
download | libevent-117e3273dce5f6aa61b1867a64c8345b78dc1620.tar.gz |
Add GCC annotations so that the vsprintf functions get checked properly
Diffstat (limited to 'include/event2/util.h')
-rw-r--r-- | include/event2/util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/event2/util.h b/include/event2/util.h index 45d8f1de..4b7e8b45 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -449,7 +449,11 @@ int evutil_snprintf(char *buf, size_t buflen, const char *format, ...) /** Replacement for vsnprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. */ -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) +#ifdef __GNUC__ + __attribute__((format(printf, 3, 0))) +#endif +; /** Replacement for inet_ntop for platforms which lack it. */ const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len); |