summaryrefslogtreecommitdiff
path: root/accel-pppd/cli
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2012-09-04 20:29:08 +0200
committerKozlov Dmitry <xeb@mail.ru>2012-09-05 22:00:11 +0400
commit07ead7eed242981335aadd34aa3d7b3e7da33b81 (patch)
tree02f6fd39e27b548d215022526a5412a4a811e394 /accel-pppd/cli
parent28c47fa1ccf6a6550f335046349b1716745a2189 (diff)
downloadaccel-ppp-07ead7eed242981335aadd34aa3d7b3e7da33b81.tar.gz
accel-ppp-07ead7eed242981335aadd34aa3d7b3e7da33b81.zip
Add compilation checks for printf-style format strings
Append the format() __attribute__ to function prototypes which use a format string. This allows GCC to check for consistency between the format string and its arguments when these functions are called. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r--accel-pppd/cli/cli.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/cli/cli.h b/accel-pppd/cli/cli.h
index cdceb2fa..c2d058a5 100644
--- a/accel-pppd/cli/cli.h
+++ b/accel-pppd/cli/cli.h
@@ -42,7 +42,7 @@ void cli_register_regexp_cmd(struct cli_regexp_cmd_t *cmd);
void cli_show_ses_register(const char *name, const char *desc, void (*print)(const struct ppp_t *ppp, char *buf));
int cli_send(void *client, const char *data);
-int cli_sendv(void *client, const char *fmt, ...);
+int cli_sendv(void *client, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3)));
#endif