[vlc-devel] commit: CPU: get rid of signal(SIGILL) - not thread-safe (in LibVLC) ( Rémi Denis-Courmont )

Rafaël Carré rafael.carre at gmail.com
Fri Aug 21 22:48:33 CEST 2009


On Fri, 21 Aug 2009 22:15:09 +0200
Pierre d'Herbemont <pdherbemont at gmail.com> wrote:

> 
> On Aug 21, 2009, at 9:31 PM, git version control wrote:
> 
> > +# warning FIXME!
> > +# define fork() (errno = ENOSYS, -1)
> > +    (void)pid;
> > +    (void)psz_capability;
> > +    return true;
> > +#endif
> 
> I used to have no opinion on this, but I think that VLC_UNUSED(arg)
> is a lot better than (void)arg. Mostly because this is more explicit,
> and then because it could be instrumented.

An advantage is also it can be grepped in the source code

> As a side node __attribute__((unused)) is probably better since it  
> could allow certain optimization from the compiler. We could switch
> to it.

the attribute goes into the function declaration, so you'd have to make
it dependant on system features

i.e.

void f(int bla) {
#ifdef WIN32
	VLC_UNUSED(bla);
#else
	bla++;
#endif
}

would turn in

#ifdef WIN32
void f(int bla __attribute__((unused)) );
#else
void f(int bla);
#endif

so it is a bit more defines (and ugliness imo)

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090821/a148bab2/attachment.sig>


More information about the vlc-devel mailing list