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 --- konsole/konsole/keytrans.cpp | 2 +- konsole/konsole/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'konsole') diff --git a/konsole/konsole/keytrans.cpp b/konsole/konsole/keytrans.cpp index da197a695..b3aa76e9f 100644 --- a/konsole/konsole/keytrans.cpp +++ b/konsole/konsole/keytrans.cpp @@ -143,7 +143,7 @@ bool KeyTrans::findEntry(int key, int bits, int* cmd, const char** txt, int* len char *c; char mask = '1' + BITS(0, bits&(1<txt.ascii()); - c = (char*)strchr(buf, '*'); + c = strchr(buf, '*'); if (c) *c = mask; *txt = buf; } diff --git a/konsole/konsole/main.cpp b/konsole/konsole/main.cpp index 5b391a5e5..d37a43be3 100644 --- a/konsole/konsole/main.cpp +++ b/konsole/konsole/main.cpp @@ -111,7 +111,7 @@ const char *konsole_shell(TQStrList &args) if (shell == NULL || *shell == '\0') shell = "/bin/sh"; if (login_shell) { - char* t = (char*)strrchr(shell,'/'); + char* t = const_cast(strrchr(shell,'/')); if (t) // see sh(1) { t = strdup(t); @@ -451,7 +451,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[]) int c = 0, l = 0; if ( !sz.isEmpty() ) { - char *ls = (char*)strchr( sz.data(), 'x' ); + char *ls = strchr( sz.data(), 'x' ); if ( ls != NULL ) { *ls='\0'; -- cgit v1.2.3