← Back to team overview

maria-developers team mailing list archive

Re: Fixing compiler warnings


Paul McCullagh <paul.mccullagh@xxxxxxxxxxxxx> writes:

> Hi Kristian,
> Thanks for the patch!
> I will definitely include these changes in the PBXT trunk.
> I am happy to accept any changes that allow the code to compile
> without warnings (this is also a requirement for compiling with
> Drizzle).

The other warning I saw in PBXT was this:

    cache_xt.h:48: warning: ‘typedef’ was ignored in this declaration
    cache_xt.h:49: warning: ‘typedef’ was ignored in this declaration

The code in question is this:

    typedef enum XTPageLockType { XT_LOCK_READ, XT_LOCK_WRITE, XT_XLOCK_LEAF };

When I first looked I thought this was due to mixing C and C++, and thought
that the compiler was being stupid. But now I see that it is actually the code
that is a bit silly, as it says typedef without giving a name of the type
being defined!

(So now I'm surprised that we don't get a syntax error, but I guess this is
just one of those dark corners of C++ that are best left alone ...)

Anyway, mentioning it in case you want to fix.

 - Kristian.

Follow ups