Bug #10298 Fails to compile with Amd64/gcc4.0
Submitted: 1 May 2005 21:05 Modified: 2 Jun 2005 3:04
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.7 OS:Linux (Linux/Debian)
Assigned to: Alfredo Kojima CPU Architecture:Any

[1 May 2005 21:05] [ name withheld ]
Description:
Forwarded from: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301833

When building 'mysql-query-browser' on amd64/unstable with gcc-4.0,
I get the following error:

x86_64-linux-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"mysql-gui-common\" -DVERSION=\"0.5.1\" -DGTKMM_VERSION=20000  -I. -I. -DXTHREADS -I/usr/include/libxml2 -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DXTHREADS -I/usr/include/gtkmm-2.0 -I/usr/lib/gtkmm-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0   -I/usr/include/mysql -DBIG_JOINS=1 -I../../library/include -I../../library/shared_include -DDATADIRNAME=\""share"\" -DCOMMONDIRNAME=\"""\"    -g -O2 -c -o MGBlobEditor.o MGBlobEditor.cc
MGBlobEditor.cc: In member function 'virtual Gtk::TreePath MGBlobListStore::get_path_vfunc(const Gtk::TreeIter&)':
MGBlobEditor.cc:79: error: cast from 'void*' to 'int' loses precision
MGBlobEditor.cc: In member function 'virtual bool MGBlobListStore::iter_next_vfunc(GtkTreeIter*)':
MGBlobEditor.cc:89: error: cast from 'void*' to 'int' loses precision
MGBlobEditor.cc:91: error: cast from 'void*' to 'int' loses precision
MGBlobEditor.cc: In member function 'virtual void MGBlobListStore::get_value_vfunc(const Gtk::TreeIter&, int, GValue*)':
MGBlobEditor.cc:121: error: cast from 'void*' to 'unsigned int' loses precision
make[3]: *** [MGBlobEditor.o] Error 1
make[3]: Leaving directory `/mysql-query-browser-1.1.6/mysql-gui-common/source/linux'

How to repeat:
.

Suggested fix:
Attached patch (modified from original report for  1.1.7)
[1 May 2005 21:06] [ name withheld ]
patch

Attachment: gcc4.patch (text/x-patch), 4.42 KiB.

[2 May 2005 4:02] Jorge del Conde
Verified w/Fedora 4
[2 Jun 2005 3:04] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Applied the patch, thanks!