Bug#364408: synfigstudio: FTBFS (amd64): cast from 'studio::DockDialog*' to 'int' loses precision

Andreas Jochens aj at andaco.de
Sun Apr 23 08:56:51 UTC 2006


Package: synfigstudio
Version: 0.61.05-1
Severity: important
Tags: patch

When building 'synfigstudio' on amd64/unstable,
I get the following error:

dockbook.cpp:218: warning: comparison is always false due to limited range of data type
if x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I../.. -I../.. -I../../src   -I/usr/include/synfig-0.0 -I/usr/include/OpenEXR -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/atk-1.0   -DNDEBUG -g -O2 -ffast-math -W -Wall -Wno-unused-parameter -MT synfigstudio-dockdialog.o -MD -MP -MF ".deps/synfigstudio-dockdialog.Tpo" -c -o synfigstudio-dockdialog.o `test -f 'dockdialog.cpp' || echo './'`dockdialog.cpp; \
	then mv -f ".deps/synfigstudio-dockdialog.Tpo" ".deps/synfigstudio-dockdialog.Po"; else rm -f ".deps/synfigstudio-dockdialog.Tpo"; exit 1; fi
dockdialog.cpp: In constructor 'studio::DockDialog::DockDialog()':
dockdialog.cpp:90: error: cast from 'studio::DockDialog*' to 'int' loses precision
dockdialog.cpp: In member function 'void studio::DockDialog::set_contents(const synfig::String&)':
dockdialog.cpp:486: warning: comparison is always true due to limited range of data type
dockdialog.cpp:486: warning: comparison is always true due to limited range of data type
dockdialog.cpp:488: warning: comparison is always false due to limited range of data type
dockdialog.cpp:488: warning: comparison is always true due to limited range of data type
dockdialog.cpp:499: warning: comparison is always false due to limited range of data type
make[4]: *** [synfigstudio-dockdialog.o] Error 1
make[4]: Leaving directory `/synfigstudio-0.61.05/src/gtkmm'

With the attached patch 'synfigstudio' can be compiled on amd64.

Regards
Andreas Jochens

diff -urN ../tmp-orig/synfigstudio-0.61.05/src/gtkmm/dockdialog.cpp ./src/gtkmm/dockdialog.cpp
--- ../tmp-orig/synfigstudio-0.61.05/src/gtkmm/dockdialog.cpp	2006-01-30 03:29:02.000000000 +0000
+++ ./src/gtkmm/dockdialog.cpp	2006-04-23 08:17:22.000000000 +0000
@@ -87,7 +87,7 @@
 	widget_comp_select=new Widget_CompSelect();
 	
 	// Give ourselves an ID that is most likely unique
-	set_id(synfig::UniqueID().get_uid()^reinterpret_cast<int>(this));
+	set_id(synfig::UniqueID().get_uid()^reinterpret_cast<long>(this));
 	
 	set_role(strprintf("dock_dialog_%d",get_id()));
 	GRAB_HINT_DATA(
diff -urN ../tmp-orig/synfigstudio-0.61.05/src/gtkmm/keyframetreestore.cpp ./src/gtkmm/keyframetreestore.cpp
--- ../tmp-orig/synfigstudio-0.61.05/src/gtkmm/keyframetreestore.cpp	2005-11-06 04:51:58.000000000 +0000
+++ ./src/gtkmm/keyframetreestore.cpp	2006-04-23 08:23:59.000000000 +0000
@@ -223,7 +223,7 @@
 void
 KeyframeTreeStore::reset_stamp()
 {
-	stamp_=time(0)+reinterpret_cast<int>(this);
+	stamp_=time(0)+reinterpret_cast<long>(this);
 }
 
 /*




More information about the pkg-synfig-devel mailing list