← Back to team overview

maria-developers team mailing list archive

Get rid of all 32 bit Visual Studio compiler warnings


This is a new version of the patch, and it removes all compiler warnings on a 32 bit build using Visual Studio 2008.

The only new parts to this patch is to set a compiler flag on the bison and flex generated files that removes warnings on those. (That nothing uses the yyerrorlab label is fine.)

Any comments on these?

My comments on the other parts of the patch, as I wrote in the last mail:

Den 07-07-2010 17:45, Bo Thorsen skrev:
The attached patch reduces the warnings in a 32 bit build with Visual
Studio 2008 to a set in the flex/bison generated code. I'll handle those

I'll add comments on some of the changes here.

The libmysqld.def file: The description line isn't supported in the more
recent compilers.

In fsp0fsp.c, there is an explicit cast to ullint. In this case, the
code does what's intended, and the compiler warning is one of the "are
you sure this is right" warnings. C4334 gives a warning if you make a
1u << 10 and store that in a 64 bit variable, because you could have
meant 1i64 << 10.

The change in i_s.cc is the one I'm most worried about. It used to store
the unsigned long long in a double. The change I did can be wrong. But
even if it's not, I'm worried what happens when this runs on an existing
set of tables.

We had a very long discussion about the cast in row0sel.c. The
conclusion was that

* auto_increment on doubles or floats is a very odd case
* there is a compiler bug in Visual Studio for very large values (above
around 2^53 it converts doubles wrong to uint64

I'd like to separate this discussion from this patch, though, and submit
a bug report on the innodb code on mysql.

I assume there will be something here I should change, but if parts of
the patch are ready for pushing, let me know that.

Bo Thorsen.
Monty Program AB.


MariaDB: MySQL replacement
Community developed. Feature enhanced. Backward compatible.