diff options
author | doug <doug@openbsd.org> | 2014-11-03 03:42:11 +0000 |
---|---|---|
committer | doug <doug@openbsd.org> | 2014-11-03 03:42:11 +0000 |
commit | 7fe19e9c5797ecfda6e95626ea882401b1748bb1 (patch) | |
tree | 5b448d2d5710e8af7c5fb5b9409db45c5081c568 /usr.sbin/ripd/parse.y | |
parent | simple conversion from select() to poll() (diff) | |
download | wireguard-openbsd-7fe19e9c5797ecfda6e95626ea882401b1748bb1.tar.xz wireguard-openbsd-7fe19e9c5797ecfda6e95626ea882401b1748bb1.zip |
Add gcc format attributes to more warn/error functions in parse.y files.
Fix a few missing or incorrect format characters.
ok claudio@
Diffstat (limited to 'usr.sbin/ripd/parse.y')
-rw-r--r-- | usr.sbin/ripd/parse.y | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y index 225f7da5fa0..37fe27f93b8 100644 --- a/usr.sbin/ripd/parse.y +++ b/usr.sbin/ripd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.31 2014/01/22 00:21:17 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.32 2014/11/03 03:42:12 doug Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -56,7 +56,9 @@ struct file *pushfile(const char *, int); int popfile(void); int yyparse(void); int yylex(void); -int yyerror(const char *, ...); +int yyerror(const char *, ...) + __attribute__((__format__ (printf, 1, 2))) + __attribute__((__nonnull__ (1))); int kw_cmp(const void *, const void *); int lookup(char *); int lgetc(int); @@ -355,7 +357,8 @@ interfaceoptsl : PASSIVE { iface->passive = 1; } if (strlcpy(iface->demote_group, $2, sizeof(iface->demote_group)) >= sizeof(iface->demote_group)) { - yyerror("demote group name \"%s\" too long"); + yyerror("demote group name \"%s\" too long", + $2); free($2); YYERROR; } |