diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-02-01 16:28:21 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-02-01 16:28:21 +0000 |
commit | 339e8963347d7724827448d6a6dff73de5117f03 (patch) | |
tree | fcf402c88a4b8340476989fc9552add726c93cc4 | |
parent | c588b9b9b928be5ab6b0c06560aef28c17878ddb (diff) |
check format string; OK niallo@, "it's nice to have" joris@.
-rw-r--r-- | usr.bin/cvs/buf.h | 5 | ||||
-rw-r--r-- | usr.bin/cvs/log.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/cvs/buf.h b/usr.bin/cvs/buf.h index f336ccea9c4..3bf945fa935 100644 --- a/usr.bin/cvs/buf.h +++ b/usr.bin/cvs/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.8 2006/01/10 14:57:53 niallo Exp $ */ +/* $OpenBSD: buf.h,v 1.9 2006/02/01 16:28:20 xsa Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -54,7 +54,8 @@ void cvs_buf_empty(BUF *); ssize_t cvs_buf_copy(BUF *, size_t, void *, size_t); ssize_t cvs_buf_set(BUF *, const void *, size_t, size_t); ssize_t cvs_buf_append(BUF *, const void *, size_t); -int cvs_buf_fappend(BUF *, const char *, ...); +int cvs_buf_fappend(BUF *, const char *, ...) + __attribute__((format(printf, 2, 3))); int cvs_buf_putc(BUF *, int); size_t cvs_buf_len(BUF *); const void *cvs_buf_peek(BUF *, size_t); diff --git a/usr.bin/cvs/log.h b/usr.bin/cvs/log.h index 5bf5a4f7f22..7ae396b29b0 100644 --- a/usr.bin/cvs/log.h +++ b/usr.bin/cvs/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.15 2006/01/02 17:06:10 xsa Exp $ */ +/* $OpenBSD: log.h,v 1.16 2006/02/01 16:28:20 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -59,10 +59,10 @@ void cvs_log_init(u_int, u_int); void cvs_log_cleanup(void); int cvs_log_filter(u_int, u_int); -int cvs_log(u_int, const char *, ...); +int cvs_log(u_int, const char *, ...) __attribute__((format(printf, 2, 3))); int cvs_vlog(u_int, const char *, va_list); -int cvs_printf(const char *, ...); +int cvs_printf(const char *, ...) __attribute__((format(printf, 1, 2))); void cvs_putchar(int); -void fatal(const char *, ...); +void fatal(const char *, ...) __dead __attribute__((format(printf, 1,2))); #endif /* LOG_H */ |