← Back to team overview

maria-developers team mailing list archive

Re: Removing a bunch of windows compilation warnings

 

Den 09-04-2010 12:24, Sergei Golubchik skrev:
Hi, Bo!

On Apr 09, Bo Thorsen wrote:
Hi everyone,

I have been working on getting rid of the compiler warnings on Windows. I'm
not sure if I have the proper fix for this one, so I separated it from the
others.

TAILQ_EMPTY(head) is defined in extra\libevent\event-internal.h as this:

#define TAILQ_EMPTY(head)        ((head)->tqh_first == NULL)

It's also defined in extra\libevent\compat\sys\queue.h as:

#define    TAILQ_FIRST(head)        ((head)->tqh_first)
#define    TAILQ_END(head)            NULL
#define    TAILQ_EMPTY(head)                        \
     (TAILQ_FIRST(head) == TAILQ_END(head))

As you can see, these two are actually identical, but the Visual C++
compiler still complains about them, because it doesn't understand that
they are identical.
what if you just delete this whole block from event-internal.h ?
In the vanilla libevent sources it's only in compat/sys/queue.h

That works fine, I'll push that instead. Much better.

Thanks,

Bo.




References