Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin Annotate functions using format strings.
details: https://anonhg.NetBSD.org/src/rev/c66604d7e3ec
branches: trunk
changeset: 325800:c66604d7e3ec
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jan 07 02:07:08 2014 +0000
description:
Annotate functions using format strings.
diffstat:
usr.bin/flock/flock.c | 6 +++---
usr.bin/ftp/ssl.h | 5 +++--
usr.bin/units/units.c | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diffs (64 lines):
diff -r 2ec4c7630029 -r c66604d7e3ec usr.bin/flock/flock.c
--- a/usr.bin/flock/flock.c Tue Jan 07 02:06:42 2014 +0000
+++ b/usr.bin/flock/flock.c Tue Jan 07 02:07:08 2014 +0000
@@ -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) {
diff -r 2ec4c7630029 -r c66604d7e3ec usr.bin/ftp/ssl.h
--- a/usr.bin/ftp/ssl.h Tue Jan 07 02:06:42 2014 +0000
+++ b/usr.bin/ftp/ssl.h Tue Jan 07 02:07:08 2014 +0000
@@ -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 *);
diff -r 2ec4c7630029 -r c66604d7e3ec usr.bin/units/units.c
--- a/usr.bin/units/units.c Tue Jan 07 02:06:42 2014 +0000
+++ b/usr.bin/units/units.c Tue Jan 07 02:07:08 2014 +0000
@@ -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@localhost)
@@ -105,7 +105,7 @@
}
-static void
+static __printflike(1, 2) void
mywarnx(const char *fmt, ...)
{
va_list args;
Home |
Main Index |
Thread Index |
Old Index