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:31:15 +0400 |
commit | fdeeb6f8547617a0478ffe847b76c46fa45487d0 (patch) | |
tree | c752b9596ea007c71ece84f38af6db08d5dd7478 /accel-pppd/cli | |
parent | 36cc9c11a194be371dad562df8b2eff548586749 (diff) | |
download | accel-ppp-fdeeb6f8547617a0478ffe847b76c46fa45487d0.tar.gz accel-ppp-fdeeb6f8547617a0478ffe847b76c46fa45487d0.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 3e31c5d..1fbb985 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 ap_session *ses, 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 |