diff options
author | 2014-09-03 02:37:24 +0000 | |
---|---|---|
committer | 2014-09-03 02:37:24 +0000 | |
commit | 84fb47522bc94c77de0d1be441b03550256ccfc2 (patch) | |
tree | 56bb952ff2650bb8ed9bcfe5875bcb7bde56c069 | |
parent | Kill off compat for systems that don't define NAME_MAX or that lack stuff (diff) | |
download | wireguard-openbsd-84fb47522bc94c77de0d1be441b03550256ccfc2.tar.xz wireguard-openbsd-84fb47522bc94c77de0d1be441b03550256ccfc2.zip |
Mark msg() and panic() as printf-like and fix the format error it turns up
ok krw@
-rw-r--r-- | sbin/restore/extern.h | 8 | ||||
-rw-r--r-- | sbin/restore/tape.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/restore/extern.h b/sbin/restore/extern.h index 0346cec907f..46dadea9dc8 100644 --- a/sbin/restore/extern.h +++ b/sbin/restore/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.10 2005/06/14 19:46:05 millert Exp $ */ +/* $OpenBSD: extern.h,v 1.11 2014/09/03 02:37:24 guenther Exp $ */ /* $NetBSD: extern.h,v 1.4 1995/03/18 14:59:43 cgd Exp $ */ /*- @@ -65,13 +65,15 @@ long listfile(char *, ino_t, int); ino_t lowerbnd(ino_t); void mktempname(struct entry *); void moveentry(struct entry *, char *); -void msg(const char *, ...); +void msg(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); char *myname(struct entry *); void newnode(struct entry *); void newtapebuf(long); long nodeupdates(char *, ino_t, int); void onintr(int); -void panic(const char *, ...); +void panic(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); void pathcheck(char *); struct direct *pathsearch(const char *); void printdumpinfo(void); diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 92a82197f3c..5fbec5efc10 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.42 2014/07/21 01:51:11 guenther Exp $ */ +/* $OpenBSD: tape.c,v 1.43 2014/09/03 02:37:24 guenther Exp $ */ /* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */ /* @@ -915,7 +915,7 @@ getmore: return; } if (rd % TP_BSIZE != 0) - panic("partial block read: %d should be %d\n", + panic("partial block read: %ld should be %ld\n", rd, ntrec * TP_BSIZE); terminateinput(); memcpy(&tapebuf[rd], &endoftapemark, TP_BSIZE); |