summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-11-18 20:50:48 -0500
committerCorey Farrell <git@cfware.com>2017-11-18 19:55:20 -0600
commit9da69ac6c16e008c72ec8fda2d34b1036cdbfde3 (patch)
tree8f3e02203daf1de6d2578aa8e0283a39138d1900 /include
parent8fdc7fd1d3e77ae171671231e318d15710a0f715 (diff)
iostream: Fix ast_iostream_printf declaration.
This adds the printf attribute and changes 'fmt' from 'const void *' to 'const char *'. This resolves a warning from some compiler for vsnprintf needing a literal string for format. Change-Id: I71c33a8262590042ee451e1146760c10bb22fb78
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/iostream.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asterisk/iostream.h b/include/asterisk/iostream.h
index c641ffb37..e9816ac9b 100644
--- a/include/asterisk/iostream.h
+++ b/include/asterisk/iostream.h
@@ -109,7 +109,8 @@ ssize_t ast_iostream_read(struct ast_iostream *stream, void *buf, size_t count);
ssize_t ast_iostream_gets(struct ast_iostream *stream, char *buf, size_t count);
ssize_t ast_iostream_discard(struct ast_iostream *stream, size_t count);
ssize_t ast_iostream_write(struct ast_iostream *stream, const void *buf, size_t count);
-ssize_t ast_iostream_printf(struct ast_iostream *stream, const void *fmt, ...);
+ssize_t __attribute__((format(printf, 2, 3))) ast_iostream_printf(
+ struct ast_iostream *stream, const char *fmt, ...);
struct ast_iostream* ast_iostream_from_fd(int *fd);
int ast_iostream_start_tls(struct ast_iostream **stream, SSL_CTX *ctx, int client);