Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys change printf gcc attribute to __printflike(), reque...
details: https://anonhg.NetBSD.org/src/rev/2ac1ee382c29
branches: trunk
changeset: 771449:2ac1ee382c29
user: christos <christos%NetBSD.org@localhost>
date: Mon Nov 21 04:36:05 2011 +0000
description:
change printf gcc attribute to __printflike(), requested by joerg.
diffstat:
sys/sys/aio.h | 5 +-
sys/sys/buf.h | 4 +-
sys/sys/kernhist.h | 5 +-
sys/sys/kmem.h | 5 +-
sys/sys/kthread.h | 6 +--
sys/sys/lockdebug.h | 4 +-
sys/sys/lwp.h | 5 +-
sys/sys/malloc.h | 4 +-
sys/sys/mbuf.h | 4 +-
sys/sys/module.h | 13 +++-----
sys/sys/mqueue.h | 5 +-
sys/sys/namei.h | 4 +-
sys/sys/pool.h | 8 ++--
sys/sys/sched.h | 4 +-
sys/sys/sleepq.h | 4 +-
sys/sys/syslog.h | 31 +++++++-----------
sys/sys/systm.h | 84 ++++++++++++++++++----------------------------------
sys/sys/tprintf.h | 5 +-
sys/sys/vmem.h | 9 ++---
sys/sys/vnode.h | 6 +-
sys/sys/wapbl.h | 4 +-
21 files changed, 88 insertions(+), 131 deletions(-)
diffs (truncated from 573 to 300 lines):
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/aio.h
--- a/sys/sys/aio.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/aio.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aio.h,v 1.10 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: aio.h,v 1.11 2011/11/21 04:36:05 christos Exp $ */
/*
* Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -115,8 +115,7 @@
extern u_int aio_listio_max;
/* Prototypes */
-void aio_print_jobs(void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+void aio_print_jobs(void (*)(const char *, ...) __printflike(1, 2));
int aio_suspend1(struct lwp *, struct aiocb **, int, struct timespec *);
#endif /* _KERNEL */
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/buf.h
--- a/sys/sys/buf.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/buf.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.117 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: buf.h,v 1.118 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -291,7 +291,7 @@
int buf_setvalimit(vsize_t);
#if defined(DDB) || defined(DEBUGPRINT)
void vfs_buf_print(buf_t *, int, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
#endif
buf_t *getiobuf(struct vnode *, bool);
void putiobuf(buf_t *);
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/kernhist.h
--- a/sys/sys/kernhist.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/kernhist.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernhist.h,v 1.3 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: kernhist.h,v 1.4 2011/11/21 04:36:05 christos Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -189,8 +189,7 @@
}
#if defined(DDB)
-void kernhist_print(void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+void kernhist_print(void (*)(const char *, ...) __printflike(1, 2));
#endif /* DDB */
#endif /* KERNHIST */
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/kmem.h
--- a/sys/sys/kmem.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/kmem.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kmem.h,v 1.5 2011/11/20 22:50:12 christos Exp $ */
+/* $NetBSD: kmem.h,v 1.6 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c)2006 YAMAMOTO Takashi,
@@ -39,8 +39,7 @@
void kmem_init(void);
size_t kmem_roundup_size(size_t);
-char *kmem_asprintf(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+char *kmem_asprintf(const char *, ...) __printflike(1, 2);
/*
* km_flag_t
*
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/kthread.h
--- a/sys/sys/kthread.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/kthread.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kthread.h,v 1.11 2011/08/07 14:03:16 rmind Exp $ */
+/* $NetBSD: kthread.h,v 1.12 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -52,9 +52,7 @@
void kthread_sysinit(void);
int kthread_create(pri_t, int, struct cpu_info *,
- void (*)(void *), void *,
- lwp_t **, const char *, ...)
- __attribute__((__format__(__printf__,7,8)));
+ void (*)(void *), void *, lwp_t **, const char *, ...) __printflike(7, 8);
void kthread_exit(int) __dead;
void kthread_destroy(lwp_t *);
int kthread_join(lwp_t *);
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/lockdebug.h
--- a/sys/sys/lockdebug.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/lockdebug.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lockdebug.h,v 1.12 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: lockdebug.h,v 1.13 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
const char *, const char *);
void lockdebug_lock_print(void *, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
#ifdef LOCKDEBUG
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/lwp.h
--- a/sys/sys/lwp.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/lwp.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwp.h,v 1.157 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: lwp.h,v 1.158 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -356,8 +356,7 @@
int lwp_unpark(lwpid_t, const void *);
/* DDB. */
-void lwp_whatis(uintptr_t, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+void lwp_whatis(uintptr_t, void (*)(const char *, ...) __printflike(1, 2));
/*
* Lock an LWP. XXX _MODULE
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/malloc.h
--- a/sys/sys/malloc.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/malloc.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: malloc.h,v 1.108 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: malloc.h,v 1.109 2011/11/21 04:36:05 christos Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -109,7 +109,7 @@
void debug_malloc_print(void);
void debug_malloc_printit(void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)), vaddr_t));
+ __printflike(1, 2), vaddr_t));
#endif /* MALLOC_DEBUG */
void *kern_realloc(void *, unsigned long, struct malloc_type *, int);
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/mbuf.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.147 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: mbuf.h,v 1.148 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -926,7 +926,7 @@
}
void m_print(const struct mbuf *, const char *, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
#endif /* _KERNEL */
#endif /* !_SYS_MBUF_H_ */
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/module.h
--- a/sys/sys/module.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/module.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: module.h,v 1.29 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: module.h,v 1.30 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,9 +142,8 @@
void module_load_vfs_init(void);
void module_whatis(uintptr_t, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
-void module_print_list(void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
+void module_print_list(void (*)(const char *, ...) __printflike(1, 2));
#ifdef _MODULE_INTERNAL
extern
@@ -152,10 +151,8 @@
prop_dictionary_t *);
int module_load_vfs(const char *, int, bool, module_t *,
prop_dictionary_t *);
-void module_error(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
-void module_print(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+void module_error(const char *, ...) __printflike(1, 2);
+void module_print(const char *, ...) __printflike(1, 2);
#endif /* _MODULE_INTERNAL */
#define MODULE_BASE_SIZE 64
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/mqueue.h
--- a/sys/sys/mqueue.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/mqueue.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mqueue.h,v 1.15 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: mqueue.h,v 1.16 2011/11/21 04:36:05 christos Exp $ */
/*
* Copyright (c) 2007-2009 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -109,8 +109,7 @@
} mq_msg_t;
/* Prototypes */
-void mqueue_print_list(void (*pr)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+void mqueue_print_list(void (*pr)(const char *, ...) __printflike(1, 2));
int mq_send1(mqd_t, const char *, size_t, u_int, struct timespec *);
int mq_recv1(mqd_t, void *, size_t, u_int *, struct timespec *, ssize_t *);
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/namei.h
--- a/sys/sys/namei.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/namei.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namei.h,v 1.78 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: namei.h,v 1.79 2011/11/21 04:36:05 christos Exp $ */
/*
@@ -272,7 +272,7 @@
void cache_cpu_init(struct cpu_info *);
void cache_purgevfs(struct mount *);
void namecache_print(struct vnode *, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
#endif
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/pool.h
--- a/sys/sys/pool.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/pool.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pool.h,v 1.71 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: pool.h,v 1.72 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000, 2007 The NetBSD Foundation, Inc.
@@ -302,9 +302,9 @@
*/
void pool_print(struct pool *, const char *);
void pool_printit(struct pool *, const char *,
- void (*)(const char *, ...) __attribute__((__format__(__printf__, 1, 2))));
+ void (*)(const char *, ...) __printflike(1, 2));
void pool_printall(const char *, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
int pool_chk(struct pool *, const char *);
/*
@@ -335,7 +335,7 @@
POOL_PADDR_INVALID)
void pool_whatis(uintptr_t, void (*)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
#endif /* _KERNEL */
#endif /* _SYS_POOL_H_ */
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/sched.h
--- a/sys/sys/sched.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/sched.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.74 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: sched.h,v 1.75 2011/11/21 04:36:05 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -249,7 +249,7 @@
struct cpu_info *sched_takecpu(struct lwp *);
void sched_print_runqueue(void (*pr)(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))));
+ __printflike(1, 2));
/* Dispatching */
bool kpreempt(uintptr_t);
diff -r cbd922839e39 -r 2ac1ee382c29 sys/sys/sleepq.h
--- a/sys/sys/sleepq.h Mon Nov 21 01:44:26 2011 +0000
+++ b/sys/sys/sleepq.h Mon Nov 21 04:36:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sleepq.h,v 1.20 2011/11/20 23:37:00 christos Exp $ */
+/* $NetBSD: sleepq.h,v 1.21 2011/11/21 04:36:06 christos Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
void turnstile_block(turnstile_t *, int, wchan_t, syncobj_t *);
void turnstile_wakeup(turnstile_t *, int, int, lwp_t *);
void turnstile_print(volatile void *, void (*)(const char *, ...)
Home |
Main Index |
Thread Index |
Old Index