[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#287007: kdegraphics: FTBFS (amd64/gcc-4.0): cast from 'KIconEdit*' to 'int' loses precision

Package: kdegraphics
Severity: normal
Tags: patch

When building 'kdegraphics' on amd64 with gcc-4.0,
I get the following error:

if g++ -DHAVE_CONFIG_H -I. -I../../kiconedit -I.. -I/usr/include/kde -I/usr/share/qt3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT kiconedit.all_cpp.o -MD -MP -MF ".deps/kiconedit.all_cpp.Tpo" -c -o kiconedit.all_cpp.o kiconedit.all_cpp.cpp; \
then mv -f ".deps/kiconedit.all_cpp.Tpo" ".deps/kiconedit.all_cpp.Po"; else rm -f ".deps/kiconedit.all_cpp.Tpo"; exit 1; fi
../../kiconedit/kiconedit.cpp: In destructor 'virtual KIconEdit::~KIconEdit()':
../../kiconedit/kiconedit.cpp:154: error: cast from 'KIconEdit*' to 'int' loses precision
make[4]: *** [kiconedit.all_cpp.o] Error 1
make[4]: Leaving directory `/kdegraphics-3.3.1/obj-x86_64-linux/kiconedit'

With the attached patch 'kdegraphics' can be compiled
on amd64 using gcc-4.0.

Andreas Jochens

diff -urN ../tmp-orig/kdegraphics-3.3.1/kiconedit/kiconedit.cpp ./kiconedit/kiconedit.cpp
--- ../tmp-orig/kdegraphics-3.3.1/kiconedit/kiconedit.cpp	2004-06-26 12:12:52.000000000 +0200
+++ ./kiconedit/kiconedit.cpp	2004-12-23 15:10:46.564933128 +0100
@@ -151,7 +151,7 @@
-    kdDebug(4640) << "Deleting KIconEdit: " << (int)this << endl;
+    kdDebug(4640) << "Deleting KIconEdit: " << (long)this << endl;
     if (windowList.count() < 1)

Reply to: