Module Name: src
Committed By: dholland
Date: Sat Mar 10 21:53:38 UTC 2012
Modified Files:
src/usr.bin/config: defs.h util.c
Log Message:
Use __printflike. Build products unchanged.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/defs.h
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/config/util.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/config/defs.h
diff -u src/usr.bin/config/defs.h:1.35 src/usr.bin/config/defs.h:1.36
--- src/usr.bin/config/defs.h:1.35 Fri Apr 30 20:47:18 2010
+++ src/usr.bin/config/defs.h Sat Mar 10 21:53:38 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.35 2010/04/30 20:47:18 pooka Exp $ */
+/* $NetBSD: defs.h,v 1.36 2012/03/10 21:53:38 dholland Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -65,6 +65,9 @@
#ifndef __dead
#define __dead
#endif
+#ifndef __printflike
+#define __printflike(a, b)
+#endif
#ifndef _PATH_DEVNULL
#define _PATH_DEVNULL "/dev/null"
#endif
@@ -556,15 +559,15 @@ void prefix_push(const char *);
void prefix_pop(void);
char *sourcepath(const char *);
void cfgwarn(const char *, ...) /* immediate warns */
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1, 2);
void cfgxwarn(const char *, int, const char *, ...) /* delayed warns */
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3, 4);
void cfgerror(const char *, ...) /* immediate errs */
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1, 2);
void cfgxerror(const char *, int, const char *, ...) /* delayed errs */
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3, 4);
__dead void panic(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1, 2);
struct nvlist *newnv(const char *, const char *, void *, long long, struct nvlist *);
void nvfree(struct nvlist *);
void nvfreel(struct nvlist *);
Index: src/usr.bin/config/util.c
diff -u src/usr.bin/config/util.c:1.8 src/usr.bin/config/util.c:1.9
--- src/usr.bin/config/util.c:1.8 Sun Dec 28 01:23:46 2008
+++ src/usr.bin/config/util.c Sat Mar 10 21:53:38 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.8 2008/12/28 01:23:46 christos Exp $ */
+/* $NetBSD: util.c,v 1.9 2012/03/10 21:53:38 dholland Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -55,11 +55,11 @@
#include "defs.h"
static void cfgvxerror(const char *, int, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3, 0);
static void cfgvxwarn(const char *, int, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3, 0);
static void cfgvxmsg(const char *, int, const char *, const char *, va_list)
- __attribute__((__format__(__printf__, 4, 0)));
+ __printflike(4, 0);
/*
* Push a prefix onto the prefix stack.