summaryrefslogtreecommitdiff
path: root/lib/librte_cmdline
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2014-06-21 00:34:30 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-06-27 02:31:08 +0200
commite8ed6c78177fbbafa326d9efc590a51705848200 (patch)
tree7e98cac5a638c6e1cabf1ac477b31300575c534d /lib/librte_cmdline
parente9199e82fcd210a64d0c34ebcab78d714dc4b453 (diff)
downloaddpdk-next-eventdev-e8ed6c78177fbbafa326d9efc590a51705848200.zip
dpdk-next-eventdev-e8ed6c78177fbbafa326d9efc590a51705848200.tar.gz
dpdk-next-eventdev-e8ed6c78177fbbafa326d9efc590a51705848200.tar.xz
eal: fix usage of printf-like functions
Mark the rte_log, cmdline_printf and rte_snprintf functions as being printf-style functions. This causes compilation errors due to mis-matched parameter types, so the parameter types are fixed where appropriate. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'lib/librte_cmdline')
-rw-r--r--lib/librte_cmdline/cmdline.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h
index 535a119..4c28d37 100644
--- a/lib/librte_cmdline/cmdline.h
+++ b/lib/librte_cmdline/cmdline.h
@@ -79,7 +79,8 @@ struct cmdline {
struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
void cmdline_set_prompt(struct cmdline *cl, const char *prompt);
void cmdline_free(struct cmdline *cl);
-void cmdline_printf(const struct cmdline *cl, const char *fmt, ...);
+void cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
+ __attribute__((format(printf,2,3)));
int cmdline_in(struct cmdline *cl, const char *buf, int size);
int cmdline_write_char(struct rdline *rdl, char c);
void cmdline_interact(struct cmdline *cl);