From 910a5e18baeba30e1e443bb86fd27a22e813d227 Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Wed, 13 Oct 2010 17:13:43 +0000 Subject: [PATCH] Pass a format string to panic() and to taskqueue_start_threads(). Found with: clang --- sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c | 2 +- sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c b/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c index 665ef53bf3a3..12e1854d2ce8 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c @@ -48,7 +48,7 @@ vcmn_err(int ce, const char *fmt, va_list adx) panic("Solaris: unknown severity level"); } if (ce == CE_PANIC) - panic(buf); + panic("%s", buf); if (ce != CE_IGNORE) vprintf(buf, adx); } diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c b/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c index 29bcd316ab74..f7b31db6f825 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c @@ -73,7 +73,7 @@ taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, tq = kmem_alloc(sizeof(*tq), KM_SLEEP); tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue, &tq->tq_queue); - (void) taskqueue_start_threads(&tq->tq_queue, nthreads, pri, name); + (void) taskqueue_start_threads(&tq->tq_queue, nthreads, pri, "%s", name); return ((taskq_t *)tq); }