On 12.12.2013 01:31:06, Richard Braun wrote:
> On Wed, Dec 11, 2013 at 09:07:38PM +0100, Marin Ramesa wrote:
> > On 11.12.2013 18:02:50, Richard Braun wrote:
> > > On Wed, Dec 11, 2013 at 05:30:43PM +0100, Marin Ramesa wrote:
> > > > -       ipc_mqueue_t mqueue;
> > > > +       ipc_mqueue_t mqueue = mqueue; /* Quiet GCC warning. */
> > > 
> > > Don't do that. Instead, tweak simple_unlock and similar functions 
> > > this way :
> > > 
> > > #define simple_unlock(l) ((void)(l))
> > 
> > Then I have to define decl_simple_lock_data() which means we end up 
> > with a lot of unused locks. And simple_lock_try() needs to always 
> > suceed with the value TRUE which means locks can't be initialized 
> > to zero.
> > 
> > It seems the best solution is to use #ifs for MACH_SLOCKS to 
> > declare and set these unused variables.
> 
> GCC allows empty structures as an extension.

Yes, empty structure works, and I didn't have to modify 
simple_lock_try().

Thanks.

Reply via email to