<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7280">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">iostream: Fix ast_iostream_printf declaration.<br><br>This adds the printf attribute and changes 'fmt' from 'const void *' to<br>'const char *'. This resolves a warning from some compiler for<br>vsnprintf needing a literal string for format.<br><br>Change-Id: I71c33a8262590042ee451e1146760c10bb22fb78<br>---<br>M include/asterisk/iostream.h<br>M main/iostream.c<br>2 files changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/80/7280/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/include/asterisk/iostream.h b/include/asterisk/iostream.h<br>index c641ffb..e9816ac 100644<br>--- a/include/asterisk/iostream.h<br>+++ b/include/asterisk/iostream.h<br>@@ -109,7 +109,8 @@<br> ssize_t ast_iostream_gets(struct ast_iostream *stream, char *buf, size_t count);<br> ssize_t ast_iostream_discard(struct ast_iostream *stream, size_t count);<br> ssize_t ast_iostream_write(struct ast_iostream *stream, const void *buf, size_t count);<br>-ssize_t ast_iostream_printf(struct ast_iostream *stream, const void *fmt, ...);<br>+ssize_t __attribute__((format(printf, 2, 3))) ast_iostream_printf(<br>+ struct ast_iostream *stream, const char *fmt, ...);<br> <br> struct ast_iostream* ast_iostream_from_fd(int *fd);<br> int ast_iostream_start_tls(struct ast_iostream **stream, SSL_CTX *ctx, int client);<br>diff --git a/main/iostream.c b/main/iostream.c<br>index 2a2601d..d918633 100644<br>--- a/main/iostream.c<br>+++ b/main/iostream.c<br>@@ -443,7 +443,7 @@<br> }<br> }<br> <br>-ssize_t ast_iostream_printf(struct ast_iostream *stream, const void *fmt, ...)<br>+ssize_t ast_iostream_printf(struct ast_iostream *stream, const char *fmt, ...)<br> {<br> char sbuf[512], *buf = sbuf;<br> int len, len2, ret = -1;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7280">change 7280</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7280"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I71c33a8262590042ee451e1146760c10bb22fb78 </div>
<div style="display:none"> Gerrit-Change-Number: 7280 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>