← Back to team overview

maria-developers team mailing list archive

Re: Fixing compiler warnings

 


On Aug 27, 2009, at 12:07 PM, Kristian Nielsen wrote:

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 }; typedef enum XTPageUnlockType { XT_UNLOCK_NONE, XT_UNLOCK_READ, XT_UNLOCK_WRITE, XT_UNLOCK_R_UPDATE, XT_UNLOCK_W_UPDATE };

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.

Yup, thanks. Will do.




--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com






References