summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-26 22:00:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-26 22:00:26 +0100
commita407e4da6564d0ab316d7e0e4f4e876a798181d0 (patch)
tree21cf1526cd13d2e29b8a1ded72eff61cdd4b73af /connectivity
parente821f8848f477eb1a58e7e892f34110c6cb51160 (diff)
loplugin:loopvartoosmall
Change-Id: Ib90fb2c3f4d976dce764d4c91af797351317397b
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx11
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
2 files changed, 7 insertions, 6 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index fba7c5f62d70..5dffd4141b76 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -54,6 +54,7 @@
#include <rtl/strbuf.hxx>
#include <algorithm>
+#include <cassert>
using namespace ::comphelper;
using namespace connectivity;
@@ -1679,7 +1680,6 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
// Update fields:
Reference<XPropertySet> xCol;
Reference<XPropertySet> xIndex;
- sal_uInt16 i;
OUString aColName;
const sal_Int32 nColumnCount = m_pColumns->getCount();
std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount);
@@ -1688,7 +1688,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
Reference<XIndexAccess> xColumns = m_pColumns;
// first search a key that exist already in the table
- for (i = 0; i < nColumnCount; ++i)
+ for (sal_Int32 i = 0; i < nColumnCount; ++i)
{
sal_Int32 nPos = i;
if(_xCols != xColumns)
@@ -1746,14 +1746,15 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
// when we are here there is no double key in the table
- for (i = 0; i < nColumnCount && nByteOffset <= m_nBufferSize ; ++i)
+ for (sal_Int32 i = 0; i < nColumnCount && nByteOffset <= m_nBufferSize ; ++i)
{
// Lengths for each data type:
- OSL_ENSURE(i < m_aPrecisions.size(),"Illegal index!");
+ assert(i >= 0);
+ OSL_ENSURE(sal_uInt32(i) < m_aPrecisions.size(),"Illegal index!");
sal_Int32 nLen = 0;
sal_Int32 nType = 0;
sal_Int32 nScale = 0;
- if ( i < m_aPrecisions.size() )
+ if ( sal_uInt32(i) < m_aPrecisions.size() )
{
nLen = m_aPrecisions[i];
nType = m_aTypes[i];
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index d2e88a92d6a4..b2f1d43a05d9 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1664,7 +1664,7 @@ bool OSQLParseNode::operator==(OSQLParseNode& rParseNode) const
bResult = bResult && !SQL_ISRULE(this, parameter);
// compare children
- for (sal_uInt32 i=0; bResult && i < count(); i++)
+ for (size_t i=0; bResult && i < count(); i++)
bResult = *getChild(i) == *rParseNode.getChild(i);
return bResult;