diff --git a/thread_pthread.c b/thread_pthread.c index eec4bca7ca..4818f61e7a 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -957,7 +957,6 @@ native_thread_create(rb_thread_t *th) } else { pthread_attr_t attr; - pthread_attr_t *const attrp = &attr; const size_t stack_size = th->vm->default_params.thread_machine_stack_size; const size_t space = space_size(stack_size); @@ -979,7 +978,7 @@ native_thread_create(rb_thread_t *th) # endif CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)); - err = pthread_create(&th->thread_id, attrp, thread_start_func_1, th); + err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th); thread_debug("create: %p (%d)\n", (void *)th, err); /* should be done in the created thread */ fill_thread_id_str(th);