Tue Jan 7 02:07:09 2014 UTC ()
Annotate functions using format strings.
(joerg)
diff -r1.8 -r1.9 src/usr.bin/flock/flock.c
diff -r1.1 -r1.2 src/usr.bin/ftp/ssl.h
diff -r1.24 -r1.25 src/usr.bin/units/units.c
--- src/usr.bin/flock/flock.c 2013/10/29 16:02:15 1.8
+++ src/usr.bin/flock/flock.c 2014/01/07 02:07:08 1.9
@@ -1,4 +1,4 @@
-/* $NetBSD: flock.c,v 1.8 2013/10/29 16:02:15 christos Exp $ */
+/* $NetBSD: flock.c,v 1.9 2014/01/07 02:07:08 joerg Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: flock.c,v 1.8 2013/10/29 16:02:15 christos Exp $");
+__RCSID("$NetBSD: flock.c,v 1.9 2014/01/07 02:07:08 joerg Exp $");
#include <stdio.h>
#include <string.h>
@@ -63,7 +63,7 @@
static sig_atomic_t timeout_expired;
-static __dead void
+static __dead __printflike(1, 2) void
usage(const char *fmt, ...)
{
if (fmt) {
--- src/usr.bin/ftp/ssl.h 2012/12/21 18:07:36 1.1
+++ src/usr.bin/ftp/ssl.h 2014/01/07 02:07:08 1.2
@@ -1,4 +1,4 @@
-/* $NetBSD: ssl.h,v 1.1 2012/12/21 18:07:36 christos Exp $ */
+/* $NetBSD: ssl.h,v 1.2 2014/01/07 02:07:08 joerg Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,8 @@
#define FETCH struct fetch_connect
struct fetch_connect;
-int fetch_printf(struct fetch_connect *, const char *fmt, ...);
+int fetch_printf(struct fetch_connect *, const char *fmt, ...)
+ __printflike(2, 3);
int fetch_fileno(struct fetch_connect *);
int fetch_error(struct fetch_connect *);
int fetch_flush(struct fetch_connect *);
--- src/usr.bin/units/units.c 2013/01/06 00:19:13 1.24
+++ src/usr.bin/units/units.c 2014/01/07 02:07:09 1.25
@@ -1,4 +1,4 @@
-/* $NetBSD: units.c,v 1.24 2013/01/06 00:19:13 wiz Exp $ */
+/* $NetBSD: units.c,v 1.25 2014/01/07 02:07:09 joerg Exp $ */
/*
* units.c Copyright (c) 1993 by Adrian Mariano (adrian@cam.cornell.edu)
@@ -105,7 +105,7 @@
}
-static void
+static __printflike(1, 2) void
mywarnx(const char *fmt, ...)
{
va_list args;