diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-11-03 03:42:13 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-11-03 03:42:13 +0000 |
commit | 2274a485cd04b40d1b504789ddc1a7b18b869eee (patch) | |
tree | b4cd53ab353d95469f828dcde38b32f29748490e /usr.sbin/ripd | |
parent | 2be3480e995472a1e2f6740d63718eaa8e87ccb9 (diff) |
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')
-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; } |