Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD/amd64 current with HAVE_GCC=48
On Fri, Mar 7, 2014 at 10:17 AM, Matt Thomas <matt%3am-software.com@localhost>
wrote:
>
> On Mar 6, 2014, at 4:35 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
>
>> The below patch should fix the error, but there may be another
>> better solution.
>>
>> Anyone any ideas?
>>
>> ozaki-r
>>
>> Index: external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
>> ===================================================================
>> RCS file:
>> /cvs/cvsroot/src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c,v
>> retrieving revision 1.25
>> diff -u -r1.25 dtrace.c
>> --- external/cddl/osnet/dist/uts/common/dtrace/dtrace.c 5 Mar 2014
>> 20:14:15 -0000 1.25
>> +++ external/cddl/osnet/dist/uts/common/dtrace/dtrace.c 7 Mar 2014
>> 00:28:47 -0000
>> @@ -16682,6 +16682,7 @@
>> cv_signal(&w->cv);
>> mutex_exit(&w->lock);
>> error = kthread_join(w->lwp);
>> + (void) error; /* XXX gcc 4.8 */
>> KASSERT(error == 0);
>> cv_destroy(&w->cv);
>> mutex_destroy(&w->lock);
>
> RCS file: /cvsroot/src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 dtrace.c
> --- external/cddl/osnet/dist/uts/common/dtrace/dtrace.c 5 Mar 2014 20:14:15
> -0000 1.25
> +++ external/cddl/osnet/dist/uts/common/dtrace/dtrace.c 7 Mar 2014 01:17:11
> -0000
> @@ -16674,14 +16674,13 @@ dtrace_state_worker_add(void (*fn)(dtrac
> void
> dtrace_state_worker_remove(struct dtrace_state_worker *w)
> {
> - int error;
>
> KASSERT(!w->exiting);
> mutex_enter(&w->lock);
> w->exiting = true;
> cv_signal(&w->cv);
> mutex_exit(&w->lock);
> - error = kthread_join(w->lwp);
> + int error __diagused = kthread_join(w->lwp);
> KASSERT(error == 0);
> cv_destroy(&w->cv);
> mutex_destroy(&w->lock);
>
Oh, I didn't know the attribute. I should read attribute(3)...
BTW I think we don't need to move the definition of error.
Thanks,
ozaki-r
Home |
Main Index |
Thread Index |
Old Index