From 3ce8a7dab59b7a77e1223d1357e6c32c31e4fba6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 26 Mar 2015 15:30:19 +0100 Subject: const_cast: convert some C-style casts and remove some redundant ones Change-Id: I03e43d219a65aa270f73a91896e0e7a567d424bc --- sal/osl/unx/file.cxx | 2 +- sal/osl/unx/profile.cxx | 2 +- sal/osl/unx/tempfile.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sal/osl') diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 143207efbd5f..d3c3f95b5cd9 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -315,7 +315,7 @@ oslFileError FileHandle_Impl::setSize (sal_uInt64 uSize) if (-1 == lseek (m_fd, (off_t)(nSize - 1), SEEK_SET)) return result; - if (-1 == write (m_fd, (char*)"", (size_t)1)) + if (-1 == write (m_fd, "", (size_t)1)) { /* Failure. Restore saved position */ (void) lseek (m_fd, (off_t)(nCurPos), SEEK_SET); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 9ca76445f78f..ce40c80938be 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -398,7 +398,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, } else { - pStr=(sal_Char*)pszDefault; + pStr=const_cast(pszDefault); } if ( pStr != 0 ) diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index 38cc0b83502f..040d3c483042 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -192,7 +192,7 @@ static oslFileError osl_create_temp_file_impl_( rtl_uStringbuffer_newFromStr_WithLength( &tmp_file_path, - rtl_uString_getStr((rtl_uString*)pustr_base_directory), + rtl_uString_getStr(const_cast(pustr_base_directory)), len_base_dir); rtl_uStringbuffer_ensureCapacity( -- cgit