summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/db/test/dbtest.c2
-rw-r--r--lib/libc/net/gethostbydns.c4
-rw-r--r--lib/libc/stdio/vfprintf.c2
-rw-r--r--lib/libc_r/test/mutex_d.c3
-rw-r--r--lib/libcam/camlib.h6
-rw-r--r--lib/libdisk/create_chunk.c2
-rw-r--r--lib/libkse/test/mutex_d.c3
-rw-r--r--lib/libkvm/kvm_private.h4
-rw-r--r--lib/libncp/ncpl_subr.c2
-rw-r--r--lib/libnetgraph/netgraph.h4
-rw-r--r--lib/libpthread/test/mutex_d.c3
-rw-r--r--sys/netncp/ncp_lib.h2
12 files changed, 26 insertions, 11 deletions
diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c
index ebf6be8..be433c0 100644
--- a/lib/libc/db/test/dbtest.c
+++ b/lib/libc/db/test/dbtest.c
@@ -64,7 +64,7 @@ enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA };
void compare __P((DBT *, DBT *));
DBTYPE dbtype __P((char *));
void dump __P((DB *, int));
-void err __P((const char *, ...));
+void err __P((const char *, ...)) __printflike(1, 2);
void get __P((DB *, DBT *));
void getdata __P((DB *, DBT *, DBT *));
void put __P((DB *, DBT *, DBT *));
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 4a56655..a113640 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -98,6 +98,10 @@ static u_char host_addr[16]; /* IPv4 or IPv6 */
static void addrsort __P((char **, int));
#endif
+#ifdef DEBUG
+static void dprintf(char *, int) __printflike(1, 0);
+#endif
+
#if PACKETSZ > 1024
#define MAXPACKET PACKETSZ
#else
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 49d4971..11f2b21 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -71,7 +71,7 @@ static const char rcsid[] =
#define FLOATING_POINT
static int __sprint __P((FILE *, struct __suio *));
-static int __sbprintf __P((FILE *, const char *, va_list));
+static int __sbprintf __P((FILE *, const char *, va_list)) __printflike(2, 0);
static char * __ultoa __P((u_long, char *, int, int, char *));
static char * __uqtoa __P((u_quad_t, char *, int, int, char *));
static void __find_arguments __P((const char *, va_list, void ***));
diff --git a/lib/libc_r/test/mutex_d.c b/lib/libc_r/test/mutex_d.c
index ea31299..21bf848 100644
--- a/lib/libc_r/test/mutex_d.c
+++ b/lib/libc_r/test/mutex_d.c
@@ -59,6 +59,9 @@
#define MAX_THREAD_CMDS 10
+static void log_error(const char *, ...) __printflike(1, 2);
+static void log_trace (const char *, ...) __printflike(1, 2);
+static void log (const char *, ...) __printflike(1, 2);
/*------------------------------------------------------------
* Types
diff --git a/lib/libcam/camlib.h b/lib/libcam/camlib.h
index 4201294..8d1823a 100644
--- a/lib/libcam/camlib.h
+++ b/lib/libcam/camlib.h
@@ -150,11 +150,11 @@ int cam_get_device(const char *path, char *dev_name,
/*
* Buffer encoding/decoding routines, from the old SCSI library.
*/
-int csio_decode(struct ccb_scsiio *csio, char *fmt, ...);
+int csio_decode(struct ccb_scsiio *csio, char *fmt, ...) __printflike(2, 3);
int csio_decode_visit(struct ccb_scsiio *csio, char *fmt,
void (*arg_put)(void *, int, void *, int, char *),
void *puthook);
-int buff_decode(u_int8_t *buff, size_t len, char *fmt, ...);
+int buff_decode(u_int8_t *buff, size_t len, char *fmt, ...) __printflike(3, 4);
int buff_decode_visit(u_int8_t *buff, size_t len, char *fmt,
void (*arg_put)(void *, int, void *, int, char *),
void *puthook);
@@ -166,7 +166,7 @@ int csio_build_visit(struct ccb_scsiio *csio, u_int8_t *data_ptr,
int timeout, char *cmd_spec,
int (*arg_get)(void *hook, char *field_name),
void *gethook);
-int csio_encode(struct ccb_scsiio *csio, char *fmt, ...);
+int csio_encode(struct ccb_scsiio *csio, char *fmt, ...) __printflike(2, 3);
int buff_encode_visit(u_int8_t *buff, size_t len, char *fmt,
int (*arg_get)(void *hook, char *field_name),
void *gethook);
diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c
index 366e373..567bea4 100644
--- a/lib/libdisk/create_chunk.c
+++ b/lib/libdisk/create_chunk.c
@@ -27,6 +27,8 @@
#include <pwd.h>
#include "libdisk.h"
+static void msgDebug(char *, ...) __printflike(1, 2);
+
/* Clone these two from sysinstall because we need our own copies
* due to link order problems with `crunch'. Feh!
*/
diff --git a/lib/libkse/test/mutex_d.c b/lib/libkse/test/mutex_d.c
index ea31299..21bf848 100644
--- a/lib/libkse/test/mutex_d.c
+++ b/lib/libkse/test/mutex_d.c
@@ -59,6 +59,9 @@
#define MAX_THREAD_CMDS 10
+static void log_error(const char *, ...) __printflike(1, 2);
+static void log_trace (const char *, ...) __printflike(1, 2);
+static void log (const char *, ...) __printflike(1, 2);
/*------------------------------------------------------------
* Types
diff --git a/lib/libkvm/kvm_private.h b/lib/libkvm/kvm_private.h
index 402b9ee..85d790f 100644
--- a/lib/libkvm/kvm_private.h
+++ b/lib/libkvm/kvm_private.h
@@ -70,7 +70,7 @@ struct __kvm {
/*
* Functions used internally by kvm, but across kvm modules.
*/
-void _kvm_err __P((kvm_t *kd, const char *program, const char *fmt, ...));
+void _kvm_err __P((kvm_t *kd, const char *program, const char *fmt, ...)) __printflike(3, 4);
void _kvm_freeprocs __P((kvm_t *kd));
void _kvm_freevtop __P((kvm_t *));
int _kvm_initvtop __P((kvm_t *));
@@ -78,5 +78,5 @@ int _kvm_kvatop __P((kvm_t *, u_long, u_long *));
void *_kvm_malloc __P((kvm_t *kd, size_t));
void *_kvm_realloc __P((kvm_t *kd, void *, size_t));
void _kvm_syserr
- __P((kvm_t *kd, const char *program, const char *fmt, ...));
+ __P((kvm_t *kd, const char *program, const char *fmt, ...)) __printflike(3, 4);
int _kvm_uvatop __P((kvm_t *, const struct proc *, u_long, u_long *));
diff --git a/lib/libncp/ncpl_subr.c b/lib/libncp/ncpl_subr.c
index 0a36126..768c183 100644
--- a/lib/libncp/ncpl_subr.c
+++ b/lib/libncp/ncpl_subr.c
@@ -435,7 +435,7 @@ ncp_args_parseopt(struct ncp_args *na, int opt, char *optarg, ncp_setopt_t *set_
* the rest - requester error;
*/
void
-ncp_error(char *fmt, int error,...) {
+ncp_error(const char *fmt, int error, ...) {
va_list ap;
fprintf(stderr, "%s: ", __progname);
diff --git a/lib/libnetgraph/netgraph.h b/lib/libnetgraph/netgraph.h
index c5a87cb..d0f402c 100644
--- a/lib/libnetgraph/netgraph.h
+++ b/lib/libnetgraph/netgraph.h
@@ -48,9 +48,9 @@
__BEGIN_DECLS
int NgMkSockNode(const char *, int *, int *);
-int NgNameNode(int, const char *, const char *, ...);
+int NgNameNode(int, const char *, const char *, ...) __printflike(3, 4);
int NgSendMsg(int, const char *, int, int, const void *, size_t);
-int NgSendAsciiMsg(int, const char *, const char *, ...);
+int NgSendAsciiMsg(int, const char *, const char *, ...) __printflike(3, 4);
int NgSendReplyMsg(int, const char *,
const struct ng_mesg *, const void *, size_t);
int NgRecvMsg(int, struct ng_mesg *, size_t, char *);
diff --git a/lib/libpthread/test/mutex_d.c b/lib/libpthread/test/mutex_d.c
index ea31299..21bf848 100644
--- a/lib/libpthread/test/mutex_d.c
+++ b/lib/libpthread/test/mutex_d.c
@@ -59,6 +59,9 @@
#define MAX_THREAD_CMDS 10
+static void log_error(const char *, ...) __printflike(1, 2);
+static void log_trace (const char *, ...) __printflike(1, 2);
+static void log (const char *, ...) __printflike(1, 2);
/*------------------------------------------------------------
* Types
diff --git a/sys/netncp/ncp_lib.h b/sys/netncp/ncp_lib.h
index d99d03f..e1fee6c 100644
--- a/sys/netncp/ncp_lib.h
+++ b/sys/netncp/ncp_lib.h
@@ -168,7 +168,7 @@ NWCCODE NWDisableTTS(NWCONN_HANDLE);
NWCCODE NWEnableTTS(NWCONN_HANDLE);
NWCCODE NWDisableFileServerLogin(NWCONN_HANDLE);
NWCCODE NWEnableFileServerLogin(NWCONN_HANDLE);
-void ncp_error(char *, int,...);
+void ncp_error(const char *, int, ...) __printf0like(1, 3);
char *ncp_printb(char *, int, const struct ncp_bitname *);
void nw_keyhash(const u_char *, const u_char *, int, u_char *);
void nw_encrypt(const u_char *, const u_char *, u_char *);
OpenPOWER on IntegriCloud