From 35ce36b713d4b17f7768c6d471a2ee5825af37da Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 17 Jan 2015 18:49:45 +0100 Subject: Some more loplugin:cstylecast: mysqlc Change-Id: I7849658606931b231c2bde0c8143bc1f325c80d4 --- mysqlc/source/mysqlc_driver.cxx | 2 +- mysqlc/source/mysqlc_preparedstatement.cxx | 2 +- mysqlc/source/mysqlc_resultset.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mysqlc') diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index b05983c30f93..96a4e666de62 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -162,7 +162,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw() const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance"; typedef void* (* FGetMySQLDriver)(); - const FGetMySQLDriver pFactoryFunction = (FGetMySQLDriver)( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) ); + const FGetMySQLDriver pFactoryFunction = reinterpret_cast( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) ); if ( !pFactoryFunction ) { OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!"); diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx index 144994848797..05257fadb295 100644 --- a/mysqlc/source/mysqlc_preparedstatement.cxx +++ b/mysqlc/source/mysqlc_preparedstatement.cxx @@ -721,7 +721,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence< checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkParameterIndex(parameter); - std::string blobby((char *)x.getConstArray(), x.getLength()); + std::string blobby(reinterpret_cast(x.getConstArray()), x.getLength()); try { static_cast(cppStatement)->setString(parameter, blobby); } catch (const sql::MethodNotImplementedException &) { diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index e0527ce73c96..57521ccc6d56 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -224,7 +224,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) if (!val.length()) { return Sequence< sal_Int8>(); } else { - return Sequence< sal_Int8 > ((sal_Int8*)val.c_str(), val.length()); + return Sequence< sal_Int8 > (reinterpret_cast(val.c_str()), val.length()); } } -- cgit