Package: centericq Version: 4.20.0-2 Severity: normal Tags: patch When building 'centericq' on amd64/unstable with gcc-4.0, I get the following error:
texteditor.cc: In static member function 'static int ktool::texteditor::findint(void*, void*)': texteditor.cc:2150: error: cast from 'void*' to 'int' loses precision make[5]: *** [texteditor.o] Error 1 make[5]: Leaving directory `/centericq-4.20.0/kkconsui-0.1/src' With the attached patch 'centericq' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/centericq-4.20.0/kkconsui-0.1/src/texteditor.cc ./kkconsui-0.1/src/texteditor.cc --- ../tmp-orig/centericq-4.20.0/kkconsui-0.1/src/texteditor.cc 2003-09-09 23:51:33.000000000 +0200 +++ ./kkconsui-0.1/src/texteditor.cc 2005-04-09 20:02:07.458823693 +0200 @@ -1940,7 +1940,7 @@ } int texteditor::findint(void *p1, void *p2) { - return *(int *) p1 != (int) p2; + return *(int *) p1 != (long) p2; } int texteditor::findhighline(void *p1, void *p2) { diff -urN ../tmp-orig/centericq-4.20.0/kkstrtext-0.1/kkstrtext.cc ./kkstrtext-0.1/kkstrtext.cc --- ../tmp-orig/centericq-4.20.0/kkstrtext-0.1/kkstrtext.cc 2005-02-01 01:13:24.000000000 +0100 +++ ./kkstrtext-0.1/kkstrtext.cc 2005-04-09 19:55:31.390211290 +0200 @@ -431,7 +431,7 @@ } int intcompare(void *s1, void *s2) { - return (int) s1 != (int) s2; + return (long) s1 != (long) s2; } string i2str(int i) { @@ -885,7 +885,7 @@ #ifdef HAVE_ICONV iconv_t cd = iconv_open(tocs.c_str(), fromcs.c_str()); - if(((int) cd) != -1) { + if(((long) cd) != -1) { string r, text(atext); size_t inleft, outleft, soutleft; char *inbuf, *outbuf, *sinbuf, *soutbuf; diff -urN ../tmp-orig/centericq-4.20.0/src/icqdialogs.cc ./src/icqdialogs.cc --- ../tmp-orig/centericq-4.20.0/src/icqdialogs.cc 2005-02-03 01:08:07.000000000 +0100 +++ ./src/icqdialogs.cc 2005-04-09 20:02:07.443826594 +0200 @@ -894,7 +894,7 @@ i = m.open(); m.close(); - if(i) f = (unsigned short) ((int) m.getref(i-1)); + if(i) f = (unsigned short) ((long) m.getref(i-1)); } void icqface::selectlanguage(unsigned short &f) { @@ -946,7 +946,7 @@ int i = m.open(); m.close(); - if(i) f = (imgender) ((int) m.getref(i-1)); + if(i) f = (imgender) ((long) m.getref(i-1)); } void icqface::selectagerange(ICQ2000::AgeRange &r) { @@ -967,7 +967,7 @@ int i = m.open(); m.close(); - if(i) r = (ICQ2000::AgeRange) ((int) m.getref(i-1)); + if(i) r = (ICQ2000::AgeRange) ((long) m.getref(i-1)); } bool icqface::edit(string &txt, const string &header) { @@ -1254,7 +1254,7 @@ void *p; finished = !db.open(n, b, &p); - i = (int) p; + i = (long) p; if(!finished) switch(b) { @@ -1745,7 +1745,7 @@ it = transfers.end(); if(!db.gettree()->isnode(db.gettree()->getid(np-1))) - it = transfers.begin() + (int) db.getmenu()->getref(n-1); + it = transfers.begin() + (long) db.getmenu()->getref(n-1); switch(b) { case 0: diff -urN ../tmp-orig/centericq-4.20.0/src/icqface.cc ./src/icqface.cc --- ../tmp-orig/centericq-4.20.0/src/icqface.cc 2005-02-03 00:26:11.000000000 +0100 +++ ./src/icqface.cc 2005-04-09 20:02:07.420831043 +0200 @@ -392,7 +392,7 @@ m.scale(); m.idle = &menuidle; - i = (int) m.getref(m.open()-1); + i = (long) m.getref(m.open()-1); m.close(); if(i) lastr = i; @@ -441,7 +441,7 @@ if(i) { lastitem = i-1; - r = (int) m.getref(lastitem); + r = (long) m.getref(lastitem); } return r; @@ -467,7 +467,7 @@ g = 0; } - if((unsigned int) c < 100) c = 0; + if((unsigned long) c < 100) c = 0; if(i) { switch(action = extk) { @@ -1430,7 +1430,7 @@ m.scale(); i = m.open(); - choice = (int) m.getref(i-1); + choice = (long) m.getref(i-1); m.close(); } @@ -1485,7 +1485,7 @@ m.close(); if(r = i) { - st = (imstatus) ((int) m.getref(i-1)); + st = (imstatus) ((long) m.getref(i-1)); } } @@ -2078,7 +2078,7 @@ c = (icqcontact *) cm->getref(i); } - if((unsigned int) c > 100) { + if((unsigned long) c > 100) { string current = c->getdispnick(); len = current.size(); if(len > nick.size()) len = nick.size(); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]