From kde-core-devel Sat Jan 08 13:25:16 2005 From: Mickael Marchand Date: Sat, 08 Jan 2005 13:25:16 +0000 To: kde-core-devel Subject: Re: [patch] Compile failures on amd64/gcc 4.0 Message-Id: <41DFDF3C.3070903 () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110519072802911 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--=_moria-11785-1105190931-0001-2" This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_moria-11785-1105190931-0001-2 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thiago Macieira wrote: > Waldo Bastian wrote: > >>On Thursday 06 January 2005 23:31, Alejandro Exojo wrote: >> >>>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. >> >>I applied all of them except the khtml ones because khtml didn't compile >>for me. They look ok though. > > > I believe the proper type for most of those pointer-to-integer casts is > ptrdiff_t. That way, we avoid future errors. > > It is a "long int" here, at least. > Hi, here is another patch for konsole this time I used ptrdiff_t as suggested by Thiago the rest of kdebase and kdelibs compiled fine (apart from khtml but the patch given before worked for me) can I commit ? Cheers, Mik --=_moria-11785-1105190931-0001-2 Content-Type: text/plain; name="gcc4-amd64.diff"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gcc4-amd64.diff" Index: konsole/keytrans.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/keytrans.cpp,v retrieving revision 1.48 diff -u -3 -p -r1.48 keytrans.cpp --- konsole/keytrans.cpp 22 Sep 2004 20:02:16 -0000 1.48 +++ konsole/keytrans.cpp 8 Jan 2005 13:22:12 -0000 @@ -372,7 +372,7 @@ Loop: //printf("line %3d: ",startofsym); getSymbol(); assertSyntax(sym == SYMName, "Name expected") assertSyntax(syms->keysyms[res], "Unknown key name") - int key = (int)syms->keysyms[res]-1; + int key = (ptrdiff_t)( syms->keysyms[res] ) -1; //printf(" key %s (%04x)",res.latin1(),(int)syms->keysyms[res]-1); getSymbol(); // + - : int mode = 0; @@ -384,7 +384,7 @@ Loop: // mode name assertSyntax(sym == SYMName, "Name expected") assertSyntax(syms->modsyms[res], "Unknown mode name") - int bits = (int)syms->modsyms[res]-1; + int bits = (ptrdiff_t)syms->modsyms[res]-1; if (mask & (1 << bits)) { fprintf(stderr,"%s(%d,%d): mode name used multible times.\n",path.ascii(),slinno,scolno); @@ -405,7 +405,7 @@ Loop: if (sym == SYMName) { assertSyntax(syms->oprsyms[res], "Unknown operator name") - cmd = (int)syms->oprsyms[res]-1; + cmd = (ptrdiff_t)syms->oprsyms[res]-1; //printf(": do %s(%d)",res.latin1(),(int)syms->oprsyms[res]-1); } if (sym == SYMString) --=_moria-11785-1105190931-0001-2--