Fix build of DTrace with GCC 4.8
Use __diagused for a variable which is only referred by KASSERT. Advised by matt@
This commit is contained in:
parent
16d5017a4b
commit
e9ddbe399c
@ -16655,7 +16655,7 @@ dtrace_state_worker_add(void (*fn)(dtrace_state_t *), dtrace_state_t *state,
|
|||||||
hrtime_t interval)
|
hrtime_t interval)
|
||||||
{
|
{
|
||||||
struct dtrace_state_worker *w;
|
struct dtrace_state_worker *w;
|
||||||
int error;
|
int error __diagused;
|
||||||
|
|
||||||
w = kmem_alloc(sizeof(*w), KM_SLEEP);
|
w = kmem_alloc(sizeof(*w), KM_SLEEP);
|
||||||
mutex_init(&w->lock, MUTEX_DEFAULT, IPL_NONE);
|
mutex_init(&w->lock, MUTEX_DEFAULT, IPL_NONE);
|
||||||
@ -16666,7 +16666,6 @@ dtrace_state_worker_add(void (*fn)(dtrace_state_t *), dtrace_state_t *state,
|
|||||||
w->exiting = false;
|
w->exiting = false;
|
||||||
error = kthread_create(PRI_NONE, KTHREAD_MPSAFE|KTHREAD_MUSTJOIN, NULL,
|
error = kthread_create(PRI_NONE, KTHREAD_MPSAFE|KTHREAD_MUSTJOIN, NULL,
|
||||||
dtrace_state_worker_thread, w, &w->lwp, "dtrace-state-worker");
|
dtrace_state_worker_thread, w, &w->lwp, "dtrace-state-worker");
|
||||||
(void) error;
|
|
||||||
KASSERT(error == 0); /* XXX */
|
KASSERT(error == 0); /* XXX */
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
@ -16674,7 +16673,7 @@ dtrace_state_worker_add(void (*fn)(dtrace_state_t *), dtrace_state_t *state,
|
|||||||
void
|
void
|
||||||
dtrace_state_worker_remove(struct dtrace_state_worker *w)
|
dtrace_state_worker_remove(struct dtrace_state_worker *w)
|
||||||
{
|
{
|
||||||
int error;
|
int error __diagused;
|
||||||
|
|
||||||
KASSERT(!w->exiting);
|
KASSERT(!w->exiting);
|
||||||
mutex_enter(&w->lock);
|
mutex_enter(&w->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user