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

Bug#286998: kdeadmin: FTBFS (amd64/gcc-4.0): cast from 'packageInfo*' to 'int' loses precision

Package: kdeadmin
Severity: normal
Tags: patch

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

if g++ -DHAVE_CONFIG_H -I. -I../../kpackage -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 kpackage.all_cpp.o -MD -MP -MF ".deps/kpackage.all_cpp.Tpo" -c -o kpackage.all_cpp.o kpackage.all_cpp.cpp; \
then mv -f ".deps/kpackage.all_cpp.Tpo" ".deps/kpackage.all_cpp.Po"; else rm -f ".deps/kpackage.all_cpp.Tpo"; exit 1; fi
../../kpackage/packageInfo.cpp: In member function 'void packageInfo::fixup()':
../../kpackage/packageInfo.cpp:117: error: cast from 'packageInfo*' to 'int' loses precision

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

Andreas Jochens

diff -urN ../tmp-orig/kdeadmin-3.3.1/kpackage/packageInfo.cpp ./kpackage/packageInfo.cpp
--- ../tmp-orig/kdeadmin-3.3.1/kpackage/packageInfo.cpp	2004-01-07 20:57:21.000000000 +0100
+++ ./kpackage/packageInfo.cpp	2004-12-23 12:19:00.830642880 +0100
@@ -114,7 +114,7 @@
   if (!info->find("name")) {
     QString *q = new QString();
-    q->setNum((int)this);
+    q->setNum((long)this);
     info->insert("name", q);

Reply to: