summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-15 22:04:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-15 22:04:59 +0000
commitffc0e2b642ced61bea304bb3008fa53fe22e17b6 (patch)
tree88231991d5e083049323d79d2b094d3a96aeb3ca
parenta043e39872162ebee03165fb47f26cb8b3e1b251 (diff)
downloadtdelibs-ffc0e2b642ced61bea304bb3008fa53fe22e17b6.tar.gz
tdelibs-ffc0e2b642ced61bea304bb3008fa53fe22e17b6.zip
Fix potential kdelibs problems caused by C style char* casts
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1247432 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kioslave/ftp/ftp.cc2
-rw-r--r--libltdl/ltdl.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc
index e310930fe..4eed185e6 100644
--- a/kioslave/ftp/ftp.cc
+++ b/kioslave/ftp/ftp.cc
@@ -1955,7 +1955,7 @@ bool Ftp::ftpReadDir(FtpEntry& de)
// and p_date_3 contains probably a time
char * semicolon;
- if ( ( semicolon = (char*)strchr( p_date_3, ':' ) ) )
+ if ( ( semicolon = const_cast<char*>(strchr( p_date_3, ':' )) ) )
{
*semicolon = '\0';
tmptr->tm_min = atoi( semicolon + 1 );
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index d3577a709..4342bf967 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -1660,7 +1660,7 @@ canonicalize_path (path)
#ifdef LT_DIRSEP_CHAR
/* Avoid this overhead where '/' is the only separator. */
- while (ptr = (char*)strchr (ptr, LT_DIRSEP_CHAR))
+ while (ptr = strchr (ptr, LT_DIRSEP_CHAR))
{
*ptr++ = '/';
}
@@ -1708,7 +1708,7 @@ find_file (basename, search_path, pdir, handle)
int lendir;
char *cur = next;
- next = (char*)strchr (cur, LT_PATHSEP_CHAR);
+ next = strchr (cur, LT_PATHSEP_CHAR);
if (!next)
{
next = cur + strlen (cur);
@@ -2082,7 +2082,7 @@ lt_dlopen (filename)
/* If the canonical module name is a path (relative or absolute)
then split it into a directory part and a name part. */
- basename = (char*)strrchr (canonical, '/');
+ basename = strrchr (canonical, '/');
if (basename)
{
++basename;
@@ -2275,7 +2275,7 @@ lt_dlopen (filename)
char *last_libname;
error = trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]);
if (! error && dlname &&
- (last_libname = (char*)strrchr (dlname, ' ')) != NULL)
+ (last_libname = strrchr (dlname, ' ')) != NULL)
{
last_libname = strdup (last_libname + 1);
LT_DLMEM_REASSIGN (dlname, last_libname);