Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 13:08:56 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Tijl Coosemans <tijl@FreeBSD.org>
Cc:        multimedia-list freebsd <freebsd-multimedia@freebsd.org>, William Grzybowski <william88@gmail.com>, freebsd-standards@FreeBSD.org
Subject:   Re: VLC 2.1.0
Message-ID:  <B2BA3BF7-2CB5-40CF-A4F0-3352D7FCA3FB@bsdimp.com>
In-Reply-To: <20131022174715.59433270@kalimero.tijl.coosemans.org>
References:  <CAHtVNLONK3hZTUoJoebjtdZbhwK8pA8deO1um191zF5pZowF9A@mail.gmail.com> <20131022152502.61214646@kalimero.tijl.coosemans.org> <CAHtVNLOp%2BXqj%2BEbVsxDsLj4tjsxJkjWLm9G0ze_ND_noYGu_=Q@mail.gmail.com> <20131022174715.59433270@kalimero.tijl.coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Oct 22, 2013, at 9:47 AM, Tijl Coosemans wrote:

> On Tue, 22 Oct 2013 12:30:38 -0200 William Grzybowski wrote:
>> On Tue, Oct 22, 2013 at 11:25 AM, Tijl Coosemans <tijl@coosemans.org> =
wrote:
>>> On Tue, 22 Oct 2013 10:55:28 -0200 William Grzybowski wrote:
>>>> I am trying to update vlc to 2.1.0, its the final step to get rid =
of
>>>> ffmpeg1 as well.
>>>> I was wondering if any c++ guru out there have any clues on how to =
fix this:
>>>>=20
>>>> http://pastebin.ca/2469885
>>>>=20
>>>> http://people.freebsd.org/~wg/vlc2.1.0.txt
>>>=20
>>> I think the problem is that clang doesn't expect } after a label.
>>> So try adding a ; or (void)0; between the label and =
vlc_cleanup_run().
>>=20
>> That works, thank you!
>=20
> I suspect that clang is correct to complain about this and if so we
> might want to add (void)0; to the definition of pthread_cleanup_pop
> in /usr/include/pthread.h.  Let's see what -standards has to say
> about this.
>=20
> Summarised: the idiom that VLC uses is this:
>=20
> pthread_cleanup_push(...);
> ...
> if (error) goto cleanup;
> ...
> cleanup:
> pthread_cleanup_pop(...);
>=20
> Because the definition of the pthread_cleanup_pop macro starts with }
> clang complains.

Any statement will do there... Clang is correct in complaining because a =
label in C labels the statement not the location.
(void) 0; is as good or bad as any...

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B2BA3BF7-2CB5-40CF-A4F0-3352D7FCA3FB>