diff options
author | bde <bde@FreeBSD.org> | 1998-07-13 06:45:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-13 06:45:23 +0000 |
commit | bf1a9b4c37da22da57d630c9aa1c79e91d310760 (patch) | |
tree | a292d667b70115407503c223922b78d70342669a /sys/ddb | |
parent | 6d974eef922ca8150f05ea068cf2b04efd9d5258 (diff) | |
download | FreeBSD-src-bf1a9b4c37da22da57d630c9aa1c79e91d310760.zip FreeBSD-src-bf1a9b4c37da22da57d630c9aa1c79e91d310760.tar.gz |
Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like
and scanf-like functions in /usr/src except for the err()/warn()
family. err() isn't quite printf-like since its format arg can
legitimately be NULL. syslog() isn't quite printf-like, but gcc
already accepts %m, even for plain printf() when it shouldn't.
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/ddb.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index 753dca9..4cfdb89 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ddb.h,v 1.18 1998/06/07 17:09:38 dfr Exp $ + * $Id: ddb.h,v 1.19 1998/07/08 09:11:40 bde Exp $ */ /* @@ -85,12 +85,12 @@ db_addr_t db_disasm __P((db_addr_t loc, boolean_t altfmt)); void db_error __P((char *s)); int db_expression __P((db_expr_t *valuep)); int db_get_variable __P((db_expr_t *valuep)); -void db_iprintf __P((const char *,...)); +void db_iprintf __P((const char *,...)) __printflike(1, 2); struct vm_map *db_map_addr __P((vm_offset_t)); boolean_t db_map_current __P((struct vm_map *)); boolean_t db_map_equal __P((struct vm_map *, struct vm_map *)); void db_print_loc_and_inst __P((db_addr_t loc)); -void db_printf __P((const char *fmt, ...)); +void db_printf __P((const char *fmt, ...)) __printflike(1, 2); void db_read_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ int db_readline __P((char *lstart, int lsize)); @@ -104,7 +104,6 @@ int db_value_of_name __P((char *name, db_expr_t *valuep)); void db_write_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ void kdb_init __P((void)); -void kdbprintf __P((const char *fmt, ...)); db_cmdfcn_t db_breakpoint_cmd; db_cmdfcn_t db_continue_cmd; |