summaryrefslogtreecommitdiff
path: root/usr.bin/indent
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-09-27 17:00:47 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-09-27 17:00:47 +0000
commitef11628f95ffab8452689858bdbb1495f39b8b59 (patch)
tree4e8ce13c5ac1b9e1cada2dda958b6be9fe7c15e0 /usr.bin/indent
parent484b9b1805369ededfcd6ba35e04aadcae6db92e (diff)
Mark diag() as printf-like
ok millert@
Diffstat (limited to 'usr.bin/indent')
-rw-r--r--usr.bin/indent/indent_globs.h4
-rw-r--r--usr.bin/indent/io.c5
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;