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

Bug#293107: kdepim: FTBFS (amd64/gcc-4.0): cast from 'KNArticle*' to 'int' loses precision



Package: kdepim
Severity: normal
Tags: patch

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

 g++ -DHAVE_CONFIG_H -I. -I/kdepim-3.3.2/./knode -I.. -I/kdepim-3.3.2/./libkdenetwork -I/kdepim-3.3.2/./libkdepim -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 -g -Wall -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 libknodecommon_la.all_cpp.lo -MD -MP -MF .deps/libknodecommon_la.all_cpp.Tpo -c libknodecommon_la.all_cpp.cpp  -fPIC -DPIC -o .libs/libknodecommon_la.all_cpp.o
/kdepim-3.3.2/./knode/kngroup.cpp: In member function 'void KNGroup::insortNewHeaders(QStrList*, KNProtocolClient*)':
/kdepim-3.3.2/./knode/kngroup.cpp:454: warning: unused variable 'count'
/kdepim-3.3.2/./knode/knarticlewidget.cpp: In member function 'void KNArticleWidget::createHtmlPage()':
/kdepim-3.3.2/./knode/knarticlewidget.cpp:1425: error: cast from 'KNArticle*' to 'int' loses precision
/kdepim-3.3.2/./knode/knmainwidget.cpp: In constructor 'FetchArticleIdDlg::FetchArticleIdDlg(QWidget*, const char*)':
/kdepim-3.3.2/./knode/knmainwidget.cpp:2328: warning: 'setButtonOKText' is deprecated (declared at /usr/include/kde/kdialogbase.h:922)
make[4]: *** [libknodecommon_la.all_cpp.lo] Error 1
make[4]: Leaving directory `/kdepim-3.3.2/obj-x86_64-linux/knode'

With the attached patch 'kdepim' can be compiled
on amd64 using gcc-4.0. 
The patch also changes the Build-Depends from 
'libreadline4-dev' to 'libreadline5-dev' in debian/control.

Regards
Andreas Jochens

diff -urN ../tmp-orig/kdepim-3.3.2/debian/control ./debian/control
--- ../tmp-orig/kdepim-3.3.2/debian/control	2005-01-31 21:46:37.654353785 +0100
+++ ./debian/control	2005-01-31 19:23:59.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
 Uploaders: Christopher L Cheney <ccheney@debian.org>, Daniel Schepler <schepler@debian.org>
-Build-Depends: autoconf, automake1.9, bison, byacc, cdbs, debhelper (>= 4.2.21), flex, gawk, gettext, groff-base, kdelibs4-dev (>> 4:3.3.2), libbluetooth1-dev, libgnokii2-dev (>= 0.6.4), libgpgme11-dev, liblockdev1-dev, libmal-dev, libpisock-dev, libreadline4-dev, libtool, libxpm-dev, sharutils, texinfo
+Build-Depends: autoconf, automake1.9, bison, byacc, cdbs, debhelper (>= 4.2.21), flex, gawk, gettext, groff-base, kdelibs4-dev (>> 4:3.3.2), libbluetooth1-dev, libgnokii2-dev (>= 0.6.4), libgpgme11-dev, liblockdev1-dev, libmal-dev, libpisock-dev, libreadline5-dev, libtool, libxpm-dev, sharutils, texinfo
 Build-Depends-Indep: doxygen, qt3-doc, kdelibs4-doc
 Standards-Version: 3.6.1.0
 
diff -urN ../tmp-orig/kdepim-3.3.2/kitchensync/libksync/standardsync.cpp ./kitchensync/libksync/standardsync.cpp
--- ../tmp-orig/kdepim-3.3.2/kitchensync/libksync/standardsync.cpp	2004-02-15 21:22:25.000000000 +0100
+++ ./kitchensync/libksync/standardsync.cpp	2005-01-31 20:36:41.000000000 +0100
@@ -40,7 +40,7 @@
        sourceEntry = source->nextEntry() ) {
     kdDebug(5250) << "SYNC: sourceEntry: " << sourceEntry->id()
                   << " (" << sourceEntry->name() << ")"
-                  << " " << int( sourceEntry ) << endl;
+                  << " " << long( sourceEntry ) << endl;
     if ( sourceEntry->dontSync() ) {
       kdDebug(5250) << "SYNC:   source don't sync" << endl;
       continue;
@@ -49,7 +49,7 @@
     if ( targetEntry ) {
       kdDebug(5250) << "SYNC:   targetEntry: " << targetEntry->id()
                     << " (" << targetEntry->name() << ")"
-                    << " " << int( targetEntry ) << endl;
+                    << " " << long( targetEntry ) << endl;
       if ( targetEntry->dontSync() ) {
         kdDebug(5250) << "SYNC:   target don't sync" << endl;
         continue;
diff -urN ../tmp-orig/kdepim-3.3.2/knode/knarticlewidget.cpp ./knode/knarticlewidget.cpp
--- ../tmp-orig/kdepim-3.3.2/knode/knarticlewidget.cpp	2004-11-28 18:22:34.000000000 +0100
+++ ./knode/knarticlewidget.cpp	2005-01-31 20:31:35.000000000 +0100
@@ -1422,7 +1422,7 @@
         if(rnv->showAttachmentsInline() && inlinePossible(var)) {
           html+="<tr><td colspan=3>";
           if(ct->isImage()) { //image
-            path=QString::number(attCnt)+"_"+QString::number((int)(a_rticle));
+            path=QString::number(attCnt)+"_"+QString::number((long)(a_rticle));
             f_actory->setData(path,new KNMimeSource(var->decodedContent(),ct->mimeType()));
             html+=QString("<a href=\"internal://att=%1\"><img src=\"%2\"></a>").arg(attCnt).arg(path);
           }
diff -urN ../tmp-orig/kdepim-3.3.2/korganizer/actionmanager.cpp ./korganizer/actionmanager.cpp
--- ../tmp-orig/kdepim-3.3.2/korganizer/actionmanager.cpp	2004-11-28 18:22:42.000000000 +0100
+++ ./korganizer/actionmanager.cpp	2005-01-31 21:11:09.000000000 +0100
@@ -1185,7 +1185,7 @@
 {
   bool visible = mResourceButtonsAction->isChecked();
 
-  kdDebug() << "RESOURCE VIEW " << int( mResourceView ) << endl;
+  kdDebug() << "RESOURCE VIEW " << long( mResourceView ) << endl;
 
   if ( mResourceView ) mResourceView->showButtons( visible );
 }
diff -urN ../tmp-orig/kdepim-3.3.2/kresources/slox/kcalresourceslox.cpp ./kresources/slox/kcalresourceslox.cpp
--- ../tmp-orig/kdepim-3.3.2/kresources/slox/kcalresourceslox.cpp	2004-11-28 18:23:09.000000000 +0100
+++ ./kresources/slox/kcalresourceslox.cpp	2005-01-31 21:08:43.000000000 +0100
@@ -162,7 +162,7 @@
 
 bool KCalResourceSlox::doLoad()
 {
-  kdDebug() << "KCalResourceSlox::load() " << int( this ) << endl;
+  kdDebug() << "KCalResourceSlox::load() " << long( this ) << endl;
 
   if ( !mOpen ) {
     kdWarning() << "Warning: resource not open." << endl;
@@ -785,7 +785,7 @@
 
 void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
 {
-  kdDebug() << "KCalResourceSlox::slotLoadEventsResult() " << int( this ) << endl;
+  kdDebug() << "KCalResourceSlox::slotLoadEventsResult() " << long( this ) << endl;
 
   if ( job->error() ) {
     loadError( job->errorString() );



Reply to: