[PATCH 16/22] pkt-line.h: use the FORMATPRINTF macro to declare the gcc function attribute 'format printf'
- From
Elia Pinto <gitter.spiros@gmail.com>
- Date
- Feb 11, 2016, 12:38 UTC
- Message-ID
- <1455194339-859-17-git-send-email-gitter.spiros@gmail.com>
- In-Reply-To
- <1455194339-859-1-git-send-email-gitter.spiros@gmail.com>
Use the new FORMATPRINTF macro (in git-compat-util.h) to declare the gcc function attribute 'format printf'
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> --- pkt-line.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkt-line.h b/pkt-line.h index 3cb9d91..d3ba3be 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -20,9 +20,9 @@ * side can't, we stay with pure read/write interfaces. */ void packet_flush(int fd); -void packet_write(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3))); +void packet_write(int fd, const char *fmt, ...) FORMATPRINTF(2,3); void packet_buf_flush(struct strbuf *buf); -void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3))); +void packet_buf_write(struct strbuf *buf, const char *fmt, ...) FORMATPRINTF(2,3); /* * Read a packetized line into the buffer, which must be at least size bytes
-- 2.5.0