summaryrefslogtreecommitdiff
path: root/sbin/restore
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-09-03 02:37:25 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-09-03 02:37:25 +0000
commitfe4f68a2fb222cb4f19cf0b7ce4e1d3aa070544f (patch)
tree878452166943e74e87c5a87b0793b42c0d6bfaa7 /sbin/restore
parentc965dae0a6b178e8949989e3b284df9324b3f174 (diff)
Mark msg() and panic() as printf-like and fix the format error it turns up
ok krw@
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/extern.h8
-rw-r--r--sbin/restore/tape.c4
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);