Some more loplugin:cstylecast: mysqlc

Change-Id: I7849658606931b231c2bde0c8143bc1f325c80d4
This commit is contained in:
Stephan Bergmann 2015-01-17 18:49:45 +01:00
parent 30f5040f8d
commit 35ce36b713
3 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance"; const rtl::OUString sSymbolName = "sql_mysql_get_driver_instance";
typedef void* (* FGetMySQLDriver)(); typedef void* (* FGetMySQLDriver)();
const FGetMySQLDriver pFactoryFunction = (FGetMySQLDriver)( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) ); const FGetMySQLDriver pFactoryFunction = reinterpret_cast<FGetMySQLDriver>( osl_getFunctionSymbol( m_hCppConnModule, sSymbolName.pData ) );
if ( !pFactoryFunction ) if ( !pFactoryFunction )
{ {
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!"); OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!");

View File

@ -721,7 +721,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
std::string blobby((char *)x.getConstArray(), x.getLength()); std::string blobby(reinterpret_cast<char const *>(x.getConstArray()), x.getLength());
try { try {
static_cast<sql::PreparedStatement *>(cppStatement)->setString(parameter, blobby); static_cast<sql::PreparedStatement *>(cppStatement)->setString(parameter, blobby);
} catch (const sql::MethodNotImplementedException &) { } catch (const sql::MethodNotImplementedException &) {

View File

@ -224,7 +224,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
if (!val.length()) { if (!val.length()) {
return Sequence< sal_Int8>(); return Sequence< sal_Int8>();
} else { } else {
return Sequence< sal_Int8 > ((sal_Int8*)val.c_str(), val.length()); return Sequence< sal_Int8 > (reinterpret_cast<sal_Int8 const *>(val.c_str()), val.length());
} }
} }