summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-01-08 04:41:40 +0000
committerguenther <guenther@openbsd.org>2014-01-08 04:41:40 +0000
commitfbfdf31155f2630da82f70186ecfb07dd6fb9e69 (patch)
treedbd0a7cc400d670e44d97bc76ce0693914b630d7
parentrename SHA256_ONLY to SHA2_SMALL; changing things so that sha512 support (diff)
downloadwireguard-openbsd-fbfdf31155f2630da82f70186ecfb07dd6fb9e69.tar.xz
wireguard-openbsd-fbfdf31155f2630da82f70186ecfb07dd6fb9e69.zip
Mark some functions as printf-like and fix a bogus format string
ok fgsch@
-rw-r--r--bin/pax/extern.h11
-rw-r--r--bin/pax/tar.c6
2 files changed, 10 insertions, 7 deletions
diff --git a/bin/pax/extern.h b/bin/pax/extern.h
index 64697d88d18..6c6d3267f27 100644
--- a/bin/pax/extern.h
+++ b/bin/pax/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.36 2013/07/03 04:08:29 guenther Exp $ */
+/* $OpenBSD: extern.h,v 1.37 2014/01/08 04:41:40 guenther Exp $ */
/* $NetBSD: extern.h,v 1.5 1996/03/26 23:54:16 mrg Exp $ */
/*-
@@ -299,7 +299,10 @@ int ustar_wr(ARCHD *);
* tty_subs.c
*/
int tty_init(void);
-void tty_prnt(const char *, ...);
+void tty_prnt(const char *, ...)
+ __attribute__((nonnull(1), format(printf, 1, 2)));
int tty_read(char *, int);
-void paxwarn(int, const char *, ...);
-void syswarn(int, int, const char *, ...);
+void paxwarn(int, const char *, ...)
+ __attribute__((nonnull(2), format(printf, 2, 3)));
+void syswarn(int, int, const char *, ...)
+ __attribute__((nonnull(3), format(printf, 3, 4)));
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index c67270a6239..49c050a50c2 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tar.c,v 1.49 2013/11/21 15:54:45 deraadt Exp $ */
+/* $OpenBSD: tar.c,v 1.50 2014/01/08 04:41:41 guenther Exp $ */
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
/*-
@@ -1241,8 +1241,8 @@ rd_xheader(ARCHD *arcn, char *buf, off_t size, char typeflag)
return (-1);
}
if (len > size) {
- paxwarn(1, "Extended header record length %j is "
- "out of range", len);
+ paxwarn(1, "Extended header record length %lld is "
+ "out of range", (long long)len);
return (-1);
}
nextp = p + len;