Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config Use __printflike. Build products unchanged.



details:   https://anonhg.NetBSD.org/src/rev/672d85f1ff9b
branches:  trunk
changeset: 777947:672d85f1ff9b
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Mar 10 21:53:38 2012 +0000

description:
Use __printflike. Build products unchanged.

diffstat:

 usr.bin/config/defs.h |  15 +++++++++------
 usr.bin/config/util.c |   8 ++++----
 2 files changed, 13 insertions(+), 10 deletions(-)

diffs (64 lines):

diff -r 9b04f6cfabb2 -r 672d85f1ff9b usr.bin/config/defs.h
--- a/usr.bin/config/defs.h     Sat Mar 10 21:51:48 2012 +0000
+++ b/usr.bin/config/defs.h     Sat Mar 10 21:53:38 2012 +0000
@@ -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_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 *);
diff -r 9b04f6cfabb2 -r 672d85f1ff9b usr.bin/config/util.c
--- a/usr.bin/config/util.c     Sat Mar 10 21:51:48 2012 +0000
+++ b/usr.bin/config/util.c     Sat Mar 10 21:53:38 2012 +0000
@@ -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.



Home | Main Index | Thread Index | Old Index