diff options
author | 2015-09-27 17:00:46 +0000 | |
---|---|---|
committer | 2015-09-27 17:00:46 +0000 | |
commit | e0cc746544aad15ef9fcc077bc208868fcc487d2 (patch) | |
tree | 163a1b74a09414bba35ff3a100192a93d9649c63 | |
parent | Mark all the error printing functions as printf-like; fix two format (diff) | |
download | wireguard-openbsd-e0cc746544aad15ef9fcc077bc208868fcc487d2.tar.xz wireguard-openbsd-e0cc746544aad15ef9fcc077bc208868fcc487d2.zip |
Mark diag() as printf-like
ok millert@
-rw-r--r-- | usr.bin/indent/indent_globs.h | 4 | ||||
-rw-r--r-- | usr.bin/indent/io.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/indent/indent_globs.h b/usr.bin/indent/indent_globs.h index ea56bf4eb8e..8c5da7f3070 100644 --- a/usr.bin/indent/indent_globs.h +++ b/usr.bin/indent/indent_globs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: indent_globs.h,v 1.13 2015/08/20 22:32:41 deraadt Exp $ */ +/* $OpenBSD: indent_globs.h,v 1.14 2015/09/27 17:00:46 guenther Exp $ */ /* * Copyright (c) 1985 Sun Microsystems, Inc. * Copyright (c) 1980, 1993 @@ -323,7 +323,7 @@ struct parser_state match_state[5]; int compute_code_target(void); int compute_label_target(void); int count_spaces(int, char *); -void diag(int, char *, ...); +void diag(int, const char *, ...) __attribute__((__format__ (printf, 2, 3))); void dump_line(void); int eqin(char *, char *); void fill_buffer(void); diff --git a/usr.bin/indent/io.c b/usr.bin/indent/io.c index 21a91fc6270..3fcfbf58566 100644 --- a/usr.bin/indent/io.c +++ b/usr.bin/indent/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.13 2013/11/26 13:21:17 deraadt Exp $ */ +/* $OpenBSD: io.c,v 1.14 2015/09/27 17:00:46 guenther Exp $ */ /* * Copyright (c) 1985 Sun Microsystems, Inc. @@ -524,9 +524,8 @@ count_spaces(int current, char *buffer) int found_err; -/* VARARGS2 */ void -diag(int level, char *msg, ...) +diag(int level, const char *msg, ...) { va_list ap; |