Module Name: src
Committed By: joerg
Date: Tue Jan 7 02:07:09 UTC 2014
Modified Files:
src/usr.bin/flock: flock.c
src/usr.bin/ftp: ssl.h
src/usr.bin/units: units.c
Log Message:
Annotate functions using format strings.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/flock/flock.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/ftp/ssl.h
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/units/units.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/flock/flock.c
diff -u src/usr.bin/flock/flock.c:1.8 src/usr.bin/flock/flock.c:1.9
--- src/usr.bin/flock/flock.c:1.8 Tue Oct 29 16:02:15 2013
+++ src/usr.bin/flock/flock.c Tue Jan 7 02:07:08 2014
@@ -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 struct option flock_longopts[] =
static sig_atomic_t timeout_expired;
-static __dead void
+static __dead __printflike(1, 2) void
usage(const char *fmt, ...)
{
if (fmt) {
Index: src/usr.bin/ftp/ssl.h
diff -u src/usr.bin/ftp/ssl.h:1.1 src/usr.bin/ftp/ssl.h:1.2
--- src/usr.bin/ftp/ssl.h:1.1 Fri Dec 21 18:07:36 2012
+++ src/usr.bin/ftp/ssl.h Tue Jan 7 02:07:08 2014
@@ -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 *);
Index: src/usr.bin/units/units.c
diff -u src/usr.bin/units/units.c:1.24 src/usr.bin/units/units.c:1.25
--- src/usr.bin/units/units.c:1.24 Sun Jan 6 00:19:13 2013
+++ src/usr.bin/units/units.c Tue Jan 7 02:07:09 2014
@@ -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 ([email protected])
@@ -105,7 +105,7 @@ dupstr(const char *str)
}
-static void
+static __printflike(1, 2) void
mywarnx(const char *fmt, ...)
{
va_list args;