From d54ab5595153b3dc57560077ff3551ffd4406b30 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 15 Aug 2011 21:36:27 +0000 Subject: Fix a number of issues in kdebase caused by C style casts This includes Bug #492 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1247425 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/fonts/kxftconfig.cpp | 4 ++-- kcontrol/kfontinst/kfontinst/Fontmap.cpp | 10 +++++----- kcontrol/kfontinst/kfontinst/XConfig.cpp | 4 ++-- kcontrol/samba/ksmbstatus.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'kcontrol') diff --git a/kcontrol/fonts/kxftconfig.cpp b/kcontrol/fonts/kxftconfig.cpp index fa4dc788e..6b7d166db 100644 --- a/kcontrol/fonts/kxftconfig.cpp +++ b/kcontrol/fonts/kxftconfig.cpp @@ -1147,7 +1147,7 @@ void KXftConfig::readContents() if(*ptr=='\"') { ptr++; - if(NULL!=(eostr=(char*)strchr(ptr, '\"')) && eostr-ptr(strchr(line, '/')), *space1=slash1 ? (char*)findSpace(slash1) : NULL, //strchr(slash1, ' ') : NULL, - *ob=slash1 ? (char*)strchr(slash1, '(') : NULL, - *cb=ob ? (char*)strchr(ob, ')') : NULL, - *slash2=space1 && !ob && !cb ? (char*)strchr(space1, '/') : NULL, + *ob=slash1 ? strchr(slash1, '(') : NULL, + *cb=ob ? strchr(ob, ')') : NULL, + *slash2=space1 && !ob && !cb ? strchr(space1, '/') : NULL, *space2=slash2 ? (char*)findSpace(slash2) : NULL, // strchr(slash2, ' ') : NULL, - *semic=cb || space2 ? (char*)strchr(cb ? cb : space2, ';') : NULL; + *semic=cb || space2 ? strchr(cb ? cb : space2, ';') : NULL; if(semic && space1-slash1e) && e-s<=constMaxItemLen) { diff --git a/kcontrol/samba/ksmbstatus.cpp b/kcontrol/samba/ksmbstatus.cpp index c94bc5129..bf775deab 100644 --- a/kcontrol/samba/ksmbstatus.cpp +++ b/kcontrol/samba/ksmbstatus.cpp @@ -136,7 +136,7 @@ void NetMon::slotReceivedData(KProcess *, char *buffer, int ) char s[250],*start,*end; size_t len; start = buffer; - while ((end = (char*)strchr(start,'\n'))) // look for '\n' + while ((end = strchr(start,'\n'))) // look for '\n' { len = end-start; if (len>=sizeof(s)) -- cgit v1.2.1