diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2012-09-04 20:29:08 +0200 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-09-05 22:00:11 +0400 |
commit | 07ead7eed242981335aadd34aa3d7b3e7da33b81 (patch) | |
tree | 02f6fd39e27b548d215022526a5412a4a811e394 /accel-pppd/cli | |
parent | 28c47fa1ccf6a6550f335046349b1716745a2189 (diff) | |
download | accel-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.h | 2 |
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 |