← Back to team overview

maria-developers team mailing list archive

Connect: compilation warnings

 

Hi Oliver,

I fixed almost all compilation warnings that happened in Connect
on my Fedora 17 laptop with gcc-4.7.2.


Most of them were "variable is initialized but not used"
and "no previous declaration". There were not serious,
but very unpleasant for developers.

(Note, we try to keep the tree in a shape that it compiles
without warnings. Connect must follow this rule as well!!!)


I think there was a bug in one place: how SQLSetStmtAttr() was called.
See "bzr diff -c 3827" for details. The value of m_RowsetSize was
erroneously passed, but SQLSetStmtAttr() expects the address of a SQLUINT variable (not a value!).

See the ODBC docs for the details:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms712631%28v=vs.85%29.aspx




One compilation warning still remains:

maria-10.0-connect/storage/connect/tabsys.cpp:279:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

It looks like a bug. Cast from 4-byte integer to 8-byte pointer
is obviously wrong. Please address the problem.

Thanks.