[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] _EVUTIL_NIL_CONDITION cause VC2010 error C2070



Of course, it works.

Maybe you should add an comment for why use sizeof(!(condition)), in
order to avoid
improper rollback accidentally.

On Sun, Jan 2, 2011 at 10:36, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:
> On Sat, Dec 25, 2010 at 10:21 PM, Dongsheng Song
> <dongsheng.song@xxxxxxxxx> wrote:
>> Hi Jones,
>>
>> Your commit b63ab17 caused VC2010 error C2070:
>>
>> bufferevent_async.c(409) : error C2070: 'unsigned int': illegal sizeof operand
>> bufferevent_async.c(434) : error C2070: 'unsigned int': illegal sizeof operand
>> bufferevent_async.c(473) : error C2070: 'unsigned int': illegal sizeof operand
>>
>> Because you can not use sizeof on bitfield, here is my patch:
>
> How about this patch instead; it ensures that EVUTIL_ASSERT() still
> counts as using a variable, while not breaking when using it with
> bitfields. Does it work for you?
>
> --
> Nick
>
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.