common: add ATTR_FMT_PRINTF wrapper

Wraps around __attribute__((format(printf, (x), (y))))
pull/4806/head
Victor Julien 6 years ago
parent a8c8e2d5c9
commit 64e307936e

@ -371,6 +371,12 @@
#define WARN_UNUSED __attribute__((warn_unused_result))
#if defined(__GNUC__)
#define ATTR_FMT_PRINTF(x, y) __attribute__((format(printf, (x), (y))))
#else
#define ATTR_FMT_PRINTF(x, y)
#endif
#define SCNtohl(x) (uint32_t)ntohl((x))
#define SCNtohs(x) (uint16_t)ntohs((x))

Loading…
Cancel
Save