diff options
Diffstat (limited to 'connectivity')
4 files changed, 12 insertions, 6 deletions
diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 0e81e71cf4ea..330156781422 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cstddef> + #include <TDatabaseMetaDataBase.hxx> #include <RowFunctionParser.hxx> @@ -139,7 +143,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) ::connectivity::ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); const sal_Int32* pType = pTypes; - for (sal_Int32 i = 1; i <= sal_Int32(std::size(pTypes)); ++i,++pType) + for (std::size_t i = 1; i <= std::size(pTypes); ++i,++pType) { ORowSetValue aValue; aValue.fill(i,*pType,xRow); diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index dbb8cb447159..2ffd82d0da7b 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -300,7 +300,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( ::osl::MutexGuard aGuard( m_aMutex ); initFields(); - for (sal_Int32 i = 0; i < static_cast<sal_Int32>(nFields); i++) + for (guint i = 0; i < nFields; i++) { if( match( columnNamePattern, getFieldName( i ), '\0' ) ) { diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index d32ac0ed22e1..d97ce47ae404 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -38,6 +38,7 @@ #include <connectivity/dbexception.hxx> #include <strings.hrc> #include <algorithm> +#include <cstddef> namespace connectivity::file { @@ -440,7 +441,7 @@ void OStatement_Base::createColumnMapping() // initialize the column index map (mapping select columns to table columns) ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns(); m_aColMapping.resize(xColumns->size() + 1); - for (sal_Int32 i=0; i<static_cast<sal_Int32>(m_aColMapping.size()); ++i) + for (std::size_t i=0; i<m_aColMapping.size(); ++i) m_aColMapping[i] = i; Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY); diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 7db4b20536e2..1dc5e8c420f6 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -59,6 +59,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> +#include <cstddef> #include <string.h> #include <string_view> @@ -429,8 +430,8 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) &table); // check, whether the columns are in the result set (required !) - int i; - for( i = 0 ; i < static_cast<int>(sourceTableKeys.size()) ; i ++ ) + std::size_t i; + for( i = 0 ; i < sourceTableKeys.size() ; i ++ ) { if( -1 == PQfnumber( result, @@ -441,7 +442,7 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) } } - if( !sourceTableKeys.empty() && i == static_cast<int>(sourceTableKeys.size()) ) + if( !sourceTableKeys.empty() && i == sourceTableKeys.size() ) { *(data->pLastResultset) = UpdateableResultSet::createFromPGResultSet( |