From kde-core-devel Thu Jan 06 22:31:22 2005 From: Alejandro Exojo Date: Thu, 06 Jan 2005 22:31:22 +0000 To: kde-core-devel Subject: [patch] Compile failures on amd64/gcc 4.0 Message-Id: <200501062331.22417.suy () kurly ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110508754618434 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_6wb3Bsb5/+r1CxO" --Boundary-00=_6wb3Bsb5/+r1CxO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi. Some bugs were filled in the Debian bug tracking system, reporting compilation problems on AMD 64 with gcc 4.0: http://bugs.debian.org/288900 http://bugs.debian.org/287095 http://bugs.debian.org/287007 http://bugs.debian.org/286998 In the reports, Andreas Jochens, contributed some patches against the 3.3 packages, but I've tried to adapt them to CVS HEAD. I'm sending them attached. Please, review and tell me if I should commit them. Thanks a lot. -- Alex (a.k.a. suy) - GPG ID 0x0B8B0BC2 http://darkshines.net/ - Jabber ID: suy@bulmalug.net --Boundary-00=_6wb3Bsb5/+r1CxO Content-Type: text/x-diff; charset="us-ascii"; name="kdeadmin_amd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdeadmin_amd64.diff" Index: kpackage/packageInfo.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdeadmin/kpackage/packageInfo.cpp,v retrieving revision 1.40 diff -u -3 -p -r1.40 packageInfo.cpp =2D-- kpackage/packageInfo.cpp 25 Oct 2004 15:21:59 -0000 1.40 +++ kpackage/packageInfo.cpp 6 Jan 2005 21:40:47 -0000 @@ -114,7 +114,7 @@ void packageInfo::fixup() { if (!info->find("name")) { QString *q =3D new QString(); =2D q->setNum((int)this); + q->setNum((long)this); info->insert("name", q); } =20 --Boundary-00=_6wb3Bsb5/+r1CxO Content-Type: text/x-diff; charset="us-ascii"; name="kdegraphics_amd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdegraphics_amd64.diff" Index: kiconedit/kiconedit.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdegraphics/kiconedit/kiconedit.cpp,v retrieving revision 1.98 diff -u -3 -p -r1.98 kiconedit.cpp =2D-- kiconedit/kiconedit.cpp 26 Jun 2004 10:12:52 -0000 1.98 +++ kiconedit/kiconedit.cpp 6 Jan 2005 21:39:49 -0000 @@ -151,7 +151,7 @@ void KIconEdit::init() =20 KIconEdit::~KIconEdit() { =2D kdDebug(4640) << "Deleting KIconEdit: " << (int)this << endl; + kdDebug(4640) << "Deleting KIconEdit: " << (long)this << endl; windowList.remove(this); =20 if (windowList.count() < 1) --Boundary-00=_6wb3Bsb5/+r1CxO Content-Type: text/x-diff; charset="us-ascii"; name="kdelibs_amd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdelibs_amd64.diff" Index: kdecore/kallocator.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdelibs/kdecore/kallocator.cpp,v retrieving revision 1.9 diff -u -3 -p -r1.9 kallocator.cpp =2D-- kdecore/kallocator.cpp 16 Dec 2002 12:59:42 -0000 1.9 +++ kdecore/kallocator.cpp 6 Jan 2005 21:37:48 -0000 @@ -82,10 +82,10 @@ KZoneAllocator::~KZoneAllocator() =20 void KZoneAllocator::insertHash(MemBlock *b) { =2D unsigned int adr =3D ((unsigned int)b->begin) & (~(blockSize - 1)); =2D unsigned int end =3D ((unsigned int)b->begin) + blockSize; + unsigned int adr =3D ((unsigned long)b->begin) & (~(blockSize - 1)); + unsigned int end =3D ((unsigned long)b->begin) + blockSize; while (adr < end) { =2D unsigned int key =3D adr >> log2; + unsigned long key =3D adr >> log2; key =3D key & (hashSize - 1); if (!hashList[key]) hashList[key] =3D new QValueList; @@ -140,10 +140,10 @@ void KZoneAllocator::delBlock(MemBlock * /* Update also the hashlists if we aren't going to reconstruct them soon. */ if (hashList && !hashDirty) { =2D unsigned int adr =3D ((unsigned int)b->begin) & (~(blockSize - 1)); =2D unsigned int end =3D ((unsigned int)b->begin) + blockSize; + unsigned long adr =3D ((unsigned long)b->begin) & (~(blockSize - 1)); + unsigned long end =3D ((unsigned long)b->begin) + blockSize; while (adr < end) { =2D unsigned int key =3D adr >> log2; + unsigned long key =3D adr >> log2; key =3D key & (hashSize - 1); if (hashList[key]) { QValueList *list =3D hashList[key]; @@ -199,7 +199,7 @@ KZoneAllocator::deallocate(void *ptr) if (hashDirty) initHash(); =20 =2D unsigned int key =3D (((unsigned int)ptr) >> log2) & (hashSize - 1); + unsigned long key =3D (((unsigned long)ptr) >> log2) & (hashSize - 1); QValueList *list =3D hashList[key]; if (!list) { /* Can happen with certain usage pattern of intermixed free_since() Index: kdecore/network/ksocketaddress.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdelibs/kdecore/network/ksocketaddress.cpp,v retrieving revision 1.17 diff -u -3 -p -r1.17 ksocketaddress.cpp =2D-- kdecore/network/ksocketaddress.cpp 1 Aug 2004 02:36:49 -0000 1.17 +++ kdecore/network/ksocketaddress.cpp 6 Jan 2005 21:37:48 -0000 @@ -226,7 +226,7 @@ struct our_sockaddr_in6 // useful definitions #define MIN_SOCKADDR_LEN sizeof(Q_UINT16) #define SOCKADDR_IN_LEN sizeof(sockaddr_in) =2D#define MIN_SOCKADDR_IN6_LEN ((unsigned) &(((our_sockaddr_in6*)0)->sin6_= scope_id)) +#define MIN_SOCKADDR_IN6_LEN ((unsigned long) &(((our_sockaddr_in6*)0)->si= n6_scope_id)) #define SOCKADDR_IN6_LEN sizeof(our_sockaddr_in6) #define MIN_SOCKADDR_UN_LEN (sizeof(Q_UINT16) + sizeof(char)) =20 Index: khtml/khtml_caret.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdelibs/khtml/khtml_caret.cpp,v retrieving revision 1.25 diff -u -3 -p -r1.25 khtml_caret.cpp =2D-- khtml/khtml_caret.cpp 26 Oct 2004 14:37:16 -0000 1.25 +++ khtml/khtml_caret.cpp 6 Jan 2005 21:37:49 -0000 @@ -2103,7 +2103,7 @@ static RenderTableCell *findNearestTable int i; for (i =3D 0; i < n; i++) { RenderTableCell *cell =3D row->row->at(i); =2D if (!cell || (int)cell =3D=3D -1) continue; + if (!cell || (long)cell =3D=3D -1) continue; =20 int absx, absy; cell->absolutePosition(absx, absy, false); // ### position: fixed? @@ -2127,7 +2127,7 @@ static RenderTableCell *findNearestTable if (index < 0 || index >=3D n) continue; =20 RenderTableCell *cell =3D row->row->at(index); =2D if (!cell || (int)cell =3D=3D -1) continue; + if (!cell || (long)cell =3D=3D -1) continue; =20 #if DEBUG_CARETMODE > 1 kdDebug(6201) << "index " << index << " cell " << cell << endl; Index: khtml/xml/dom_docimpl.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdelibs/khtml/xml/dom_docimpl.cpp,v retrieving revision 1.304 diff -u -3 -p -r1.304 dom_docimpl.cpp =2D-- khtml/xml/dom_docimpl.cpp 17 Dec 2004 10:41:39 -0000 1.304 +++ khtml/xml/dom_docimpl.cpp 6 Jan 2005 21:37:50 -0000 @@ -1691,11 +1691,11 @@ NodeImpl::Id DocumentImpl::getId( NodeIm QString name =3D cs ? n.string() : n.string().upper(); =20 if (!_nsURI) { =2D id =3D (NodeImpl::Id) map->ids.find( name ); + id =3D (NodeImpl::Id)(long) map->ids.find( name ); if (!id && _type !=3D NodeImpl::NamespaceId) =2D id =3D (NodeImpl::Id) map->ids.find( "aliases: " + name ); + id =3D (NodeImpl::Id)(long) map->ids.find( "aliases: " + name = ); } else { =2D id =3D (NodeImpl::Id) map->ids.find( name ); + id =3D (NodeImpl::Id)(long) map->ids.find( name ); if (!readonly && id && _prefix && _prefix->l) { // we were called in registration mode... check if the alias e= xists QConstString px( _prefix->s, _prefix->l ); --Boundary-00=_6wb3Bsb5/+r1CxO Content-Type: text/x-diff; charset="us-ascii"; name="kdemultimedia_amd64.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdemultimedia_amd64.diff" Index: noatun/modules/splitplaylist/playlist.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdemultimedia/noatun/modules/splitplaylist/playlist.cpp= ,v retrieving revision 1.54 diff -u -3 -p -r1.54 playlist.cpp =2D-- noatun/modules/splitplaylist/playlist.cpp 1 Dec 2004 16:01:28 -0000 1= =2E54 +++ noatun/modules/splitplaylist/playlist.cpp 6 Jan 2005 21:39:08 -0000 @@ -266,7 +266,7 @@ void SplitPlaylist::randomize() =20 for(int i =3D 0; i < lview->childCount(); i++) { =2D items.take()->moveItem(lview->itemAtIndex((int) list.take())); + items.take()->moveItem(lview->itemAtIndex((long) list.take())); } =20 setCurrent(currentItem, false); --Boundary-00=_6wb3Bsb5/+r1CxO--